Most voted "vb.net" questions
Visual Basic . NET (VB.NET) is an object-oriented computer programming language that can be seen as an evolution of Microsoft Visual Basic 6 (VB6), but applied on the . NET Framework by Microsoft.
Learn more…682 questions
Sort by count of
-
29
votes5
answers69449
viewsHow to make a regular expression for mobile phone?
How to create a regular expression to validate the phone field you accept 99-99999999 (DDD + 8 numbers) or 99-999999999 (DDD + 9 numbers). And that when typing it add the dash - automatically!…
-
26
votes2
answers1892
viewsWhat is the difference, in practice, between "" and String.Empty?
No. NET is noticeable in multiple ways to initialize a string with an empty value, called "quotation marks". Is there a right way to do this? And what would be the practical difference between…
-
24
votes1
answer2966
viewsRoslyn Compiler - What is it, and why was it created?
What is the Roslyn compiler? This is the standard compiler of Visual Studio? Is it open source? Why did they do it? Only for C# or other languages?
c# .net vb.net compilation .net-compiler-platformasked 9 years, 2 months ago Guilherme de Jesus Santos 6,566 -
19
votes2
answers5046
viewsWhat is the difference between Isnullorempty and Isnullorwhitespace?
Li here that there is no practical difference between String.Empty and "", and then the doubt came to me. What’s the difference between using String.IsNullOrEmpty(String) and…
-
16
votes3
answers7424
viewsWhat are the main differences between VB.NET and C#?
In addition to syntax, what are the main differences between these two languages? Is there any difference in performance between them? Or is there any case where it is extremely advisable to use one…
-
15
votes1
answer1419
viewsWhat is the advantage of semicolons in programming languages?
I know that in programming languages like Java and C#, the semicolon indicates the end of the instruction, as in the example below, in C#: System.Console.WriteLine("Hello, World!"); However, there…
-
12
votes2
answers949
views -
12
votes1
answer162
viewsIs "Then" really necessary at the end of the If block?
The Visual Basic . NET compiler seems to ignore the reserved word Then, the one at the end of the block If. If (1 + 1 = 2) Then Console.WriteLine("Passou no teste.") End If And now, without the…
-
12
votes1
answer12831
viewsWhat are the main differences between VB.NET, VB6 and VBA?
What are the main differences between VB.NET, VB6 and VBA?
-
9
votes1
answer266
viewsProblem with Fast Colored Textbox (indentation)
I’m modifying an open source project created by Pavel Torgashov, called Fast Colored Textbox, and I’m having problems with the language VB in the editor, because methods and properties are indented…
-
9
votes2
answers993
viewsIs there the equivalent of Andalso and Orelse in C#?
In VB.NET there are two interesting operators: the AndAlso and the OrElse. When used, the logical expression is not evaluated in full immediately. See the following example: If (Not Usuario Is…
-
8
votes2
answers1180
viewsIs it possible to link a C# form to a VB.NET project?
I have two different projects, one with only one form in C#, I can embed the form in my project in VB.NET ?
-
8
votes3
answers466
viewsBest practice to check if the module is being used
My question which perhaps - I hope not - can be considered as of opinion, is conceptual and even simple. In most applications, we work with features that when used by multiple users at the same time…
-
8
votes3
answers224
viewsUse of using versus full name
I’ve been following many projects open source and I realized that there’s a really big alternation between using using (Imports in VB.NET) and use direct reference to the namespace. Example: void…
-
8
votes1
answer2537
viewsConsume Webservice Nfedistribuicaodfe - VB.NET or C# - Manifestation/Download Nfe
On the Nfe Nacional website (http://www.nfe.fazenda.gov.br/portal/webServices.aspx?tipoConteudo=Wak0FwB7dKs=) i already have a software made in VB.NET that consumes the WEBSERVICES (NfeConsultaDest…
-
7
votes2
answers461
viewsWriting conventions for ASP.NET controls
When you drag a control from Toolbox to a Web Form Visual Studio automatically adds an ID to this control consisting of its type with uppercase first letter and a number. This is the same pattern…
-
7
votes1
answer700
viewsWhat’s it for, and when to use Friend?
Code example: Friend Const Public Frind
-
7
votes1
answer382
viewsDatagridview VB Celulas Editaveis
Hello, I have a Datagridview that is populated by a Bindingsource and when I load the data I can’t edit the Cells with value, only when I load the empty Datagridview, I tried to use…
vb.netasked 9 years, 5 months ago Hebert Lima 987 -
6
votes1
answer4038
viewsHow do I convert a . PFX certificate to . PEM?
I exported a file .pfx of my A3 certificate. How do I convert it to .pem. In VB.Net if possible.
-
6
votes2
answers233
viewsIs there any way to handle all Exceptions of the software?
I’m creating a DLL for use in various projects of mine. I created a method that captures Source, Message and other variables that I defined, assembles an email and sends them to myself. (a kind of…
-
6
votes1
answer183
viewsCreating Properties, Summary and Custom Colors for Methods and Types
Is there a way or attribute that puts in a Class, Method, Structure or anything else that changes its color? Example of the function CType: Notice that she is colorful, and her arguments instead of…
-
6
votes3
answers178
viewsHow to capture a Nullreferenceexception?
When I test my application, it returns some specific data, but when the requested data is null, this untreated exception error appears I tried to capture him but I think I’m making a mistake. How…
-
6
votes1
answer113
viewsProblem showing received SMS
Fala galera! I’m trying to show a SMS received in a text box in a Form that I have, but instead of showing me the message that I get in my SIM, it shows something like +CMTI: "ME",33. I’ll leave the…
-
6
votes3
answers5277
viewsWhat does "Dim" mean in Basic?
Okay, most programmers (I think most of them) of Basic (popular; Visual Basic compiler) know what the use of Dim, but I also think you don’t know what that word means... Basic Keywords are so…
-
6
votes1
answer99
viewsHow to automatically add namespaces in Visual Basic?
When creating any class in C#, using Visual Studio, it automatically adds the namespace, as can be seen below: namespace Aplicacao.Modelo { class Cliente { } } In Visual Basic, he doesn’t do the…
-
6
votes1
answer102
viewsHow does Visual Studio’s Edit and Continue work?
Visual Studio allows you to edit C#, VB.NET or C++ code in debug when you hit a breakpoint or click the break button (pause icon). The name of the tool is Edit and Continue. According to the…
-
6
votes1
answer177
viewsWhen to use Memorycache?
I would like a real example, not necessarily a code, on when use the MemoryCache on Web systems. What types of situation ask for its use? A little context: I participated in an interview where they…
-
5
votes1
answer243
viewsGet an image of the body of an email, write to the database or in memory and show it in a new Viewer
I’m trying to build an E-mail viewer. To do so, I access my IMAP server and get email using the DLL ComponentSoft.Net.Mail. After getting the message, I intend to present it in my viewer. However, I…
-
5
votes1
answer1258
viewsHow do I place a Password field in a Messagebox?
How to enter a field that I can put a password into MessageBox. I could call one form, but wanted something simpler and faster, I would like that when I click on a button it provides a field to put…
-
5
votes1
answer148
viewsImport is not working
Imports System.DirectoryServices ERROR MESSAGE: "Warning 1 Namespace or type specified in the Imports 'System.Directory.Services' doesn’t contain any public Member or cannot be found. Make sure the…
-
5
votes2
answers1527
viewsHow do I close/close a msgbox via code?
I tried to find out how I could do this, but I did not find anything clear. I want to know if it is possible to close the first msgbox, shortly after 2 seconds. Follows the Code: MsgBox("Iniciando…
-
5
votes1
answer90
viewsVisual Studio or Eclipse Code Review Rule
I wonder if there is any add-in for visual studio that ensures that while I am in development environment make some changes but when I generate the build of the project, this commented part is…
-
5
votes1
answer407
viewsHow to create a new configSections in App.config
I am working with an application that currently uses the section appSettings to obtain application settings through ConfigurationManager.AppSettings. But I would like a more complex structure for my…
-
5
votes3
answers10165
viewsRemove non-numeric characters from a string
Example: I have the following string "M1245D454" and I need to just leave the numbers on it. M and D are examples, I want to remove any non-numeric character. There is some function in C# or VB.NET…
-
5
votes1
answer112
viewsHow and when to use "Shadows" and "Overrides"?
How and when to use Shadows and Overrides? What are the usage recommendations for each and in what context to use them?…
-
5
votes1
answer3045
viewsDifference between If and Iif
In VB.NET, what is the difference of the use of If and of IIf under these conditions? If Condicao Then x() Else y() End If IIf(Condicao, x(), y())…
-
5
votes2
answers185
viewsHow to pass a lambda expression as argument of a parameter in a method?
Is there any way to pass a lambda expression as a parameter argument in a method? For example: Private Sub Metodo(Expressao As ?) Lista = Lista.Where(Expressao) End Sub…
-
5
votes1
answer195
viewsWhat are the differences between the following Caps and when to use each one?
Casting [...] process where an object type is explicitly converted to another type, if conversion is allowed. Source: Stackoverflow in Portuguese Assuming the following situation: var i = 10 What…
-
5
votes1
answer716
viewsWhat is the difference between the "+" and "&" operators when concatenating strings?
In VB.NET, there are two operators I use in concatenating strings, the & and the + (I know there are more efficient methods for concatenating strings, but in this question, I pay attention only…
-
5
votes1
answer135
viewsWhen and why use the Obsolete attribute?
At least in the projects I’ve worked on, I see no point in using the attribute Obsolete in methods that are no longer used. What I do, and I see people doing is removing or commenting on codes that…
-
5
votes1
answer183
viewsPass arguments to the property getter
VB.NET allows you to declare parameters in the property getter Public ReadOnly Property Propriedade(param As String) As String Get Return param & "!" End Get End Property It’s a strange feature…
-
5
votes3
answers87
viewsHow do I make a conditional if by comparing only the last 2 digits?
I am doing a project in Visual Basic but when the user type a string that will be 5 the maximum ex: UF052 I want to do a if where it will be compared. If textbox1 = "UF052" the Comando End if…
-
4
votes1
answer5050
viewsHow to Read MFD Files Tax Hard Disk Printer
Is there any way to read MFD file tax printer that is on hard drive? These files are binary there is some way to read binary files and save with txt? Printer: BEMATECH MP-2100 FI…
-
4
votes2
answers285
viewsDetect generated event in another class
I have a class (in VB) that returns an event of TimeOut, that is, if time runs out it returns an event content with a string with the data I need using Raiseevent. How can I treat this event in the…
-
4
votes1
answer523
viewsIs it possible to use pointers in VB.NET?
Is it possible to use VB.NET pointers? If so, how do they work? An example in C++: CSR = ConfigurarInterfaceDeRede(randInt(0,999999),CodAtivacaoSAT,(char*)xml); int a; int *p; p = &a; How would…
-
4
votes2
answers29746
viewsHow to pass data from one table to another SQL
I am doubtful to pass data from one table to another: Example: Table 1 --> Table 2 ---> delete all information from Table 1 I am creating the project in VB.NET and using SQL…
-
4
votes3
answers4420
viewsError when signing a SHA256 Hash using Digital Certificate
Is returning error from Invalid algorithm Specified, when it will be signed, how to proceed? Dim data = Encoding.UTF8.GetBytes(Me.txtCNPJEmpresa.Text + Me.txtCNPJSoftwareHouse.Text) Dim csp As…
-
4
votes1
answer3189
viewsHow to change the blinking cursor from "|" to "_" in a textbox
I’d like to know how to use the character _ to write, like when you press the key Insert in some text editors (Notepad++) and the text is written with the _ in front of the letters. More basically,…
-
4
votes3
answers125
viewsSearch List(Of String) - Case insensitive
How to look for a String in a List(Of String) without considering the case? I’m using . net 2.0. Contains does not allow passing any additional parameter. I tried to use Find but it didn’t work…
-
4
votes1
answer1060
viewsHTTP 500 error using Httpwebrequest
I come here to ask for help regarding Httpwebrequest requests. I need to get the return html of an HTTP 500 (HTTP/1.1 500 Internal Server Error) error. Could someone tell me how it could be done?…