Questions tagged as 'vb.net'

2
answers

What is the difference, in practice, between "" and String.Empty?

In .NET you can see the multiple ways to initialize a string with an empty value, commonly known as "double quote". Is there a proper way to do this? And what would be the practical difference between using: var nome = String.Empty;...
asked by 05.09.2016 / 15:33
1
answer

Compiler Roslyn - What is it, and why was it created?

What is the Roslyn compiler? Is this the default Visual Studio compiler? Is it open source? Why did they do this? Only for C # or other languages as well?     
asked by 26.08.2015 / 22:08
2
answers

What is the difference between IsNullOrEmpty and IsNullOrWhiteSpace?

I have here that there is no practical difference between String.Empty and "" , and then it came to me doubt. What's the difference between using String.IsNullOrEmpty(String) and String.IsNullOrWhiteSpace(String) ?...
asked by 20.12.2016 / 22:30
5
answers

How to make a regular expression for cell phone?

How to create a regular expression to validate the phone field that accepts 99-99999999 (DDD + 8 numbers) or 99-999999999 (DDD + 9 numbers). And when typing it add the - dash automatically! ValidationExpression="^[0-9]{2}-([0-9]{8}|[0-9]{9})...
asked by 13.01.2015 / 13:23
3
answers

What are the main differences between VB.Net and C #?

In addition to the syntax, what are the main differences between these two languages? Is there any performance difference between them? Or is there a case in which it is extremely advisable to use one language and not the other, or is VB.Net...
asked by 22.02.2015 / 18:31
1
answer

What is the advantage of a semicolon in programming languages?

I know that in programming languages like Java and C #, the semicolon indicates the end of the statement, as in the example below, in C #: System.Console.WriteLine("Hello, World!"); However, there are still languages in which the semicolon...
asked by 27.02.2017 / 01:16
2
answers

How namespace works in ASP.NET

I do not know ASP.NET, but I had to support a very disorganized third party code by the way. I have a xxxx.aspx file that is in the /cp folder and has these calls: <%@ Page Language="VB" Debug="true" %> <%@ Import Namespace...
asked by 13.05.2014 / 16:09
1
answer

Do you really need the "Then" at the end of the If block?

The Visual Basic .NET compiler seems to ignore the reserved word Then , which is at the end of the If block. If (1 + 1 = 2) Then Console.WriteLine("Passou no teste.") End If And now, without Then : If (1 + 1 =...
asked by 22.10.2015 / 00:29
1
answer

Problem with Fast Colored TextBox (indentation)

I am modifying an open source project created by Pavel Torgashov, called Fast Colored TextBox, and am having problems with the VB language in the editor, since methods and properties are indented within Interfaces ...    Instead of lookin...
asked by 05.06.2015 / 07:10
3
answers

Use of using versus full name

I've been following many open source projects and noticed that there is a fairly large switch between using using ( Imports in VB.NET) and using direct reference to namespace . Example: void Main() { System.Int32 i...
asked by 17.07.2015 / 19:04