Questions tagged [vb.net]

Visual Basic .NET is a .NET oriented-object implementation and evolution of Visual Basic developed by Microsoft.

Visual Basic .NET is a .NET oriented-object implementation and evolution of Visual Basic developed by Microsoft. The first implementation, for .NET 1.0, was nicknamed "Visual Basic .NET (2002)".

Since Visual Basic 2005, the third .NET version of Visual Basic, Microsoft has decided to drop the ".NET" portion of the title.

Apart from the syntax which has seen some additions between VB and the latest VB.NET version, there are much more important differences such as:

  • the semantics; VB runs on a deterministic, reference-counted engine based on COM whereas VB.NET is a fully oriented-object language running on the .NET Framework, and as such on the CLR (Common Language Runtime).
  • the library is much larger in VB.Net than in VB. Some functions and libraries no longer exist in VB. Although VB6 code will be successfully migrated to VB.Net it is very often necessary to refactor to obtain better performance.

Please note that purely "debate" questions on the choice between C# and VB.NET will be closed.

Also, please avoid combining the C# and VB.Net tags if the question is only related to one of those languages.

132 questions
82
votes
4 answers

Should we include the NuGet PACKAGE folder in version control?

In a C# or VB.NET project, should we include the PACKAGE folder (NuGet package folder that is created in the root of my project that contains the nupkg files and other content) to our source control repository (Git for instance)?
Bastien Vandamme
  • 1,623
  • 2
  • 14
  • 15
59
votes
7 answers

.NET Properties - Use Private Set or ReadOnly Property?

In what situation should I use a Private Set on a property versus making it a ReadOnly property? Take into consideration the two very simplistic examples below. First example: Public Class Person Private _name As String Public Property…
tgxiii
  • 693
  • 1
  • 5
  • 5
28
votes
22 answers

Why is VB so popular?

To me, Visual Basic seems clumsy, ugly, error-prone, and difficult to read. I'll let others explain why. While VB.net has clearly been a huge leap forward for the language in terms of features, I still don't understand why anyone would choose to…
aaaidan
27
votes
5 answers

When conversion from Integer to Single may lose precision

I was reading an article from Microsoft regarding Widening Conversions and Option Strict On when I got to the part The following conversions may lose precision: Integer to Single Long to Single or Double Decimal to Single or Double However,…
Vinicius V
  • 387
  • 3
  • 3
17
votes
3 answers

Naming Convention for Dedicated Thread Locking objects

A relatively minor question, but I haven't been able to find official documentation or even blog opinion/discussions on it. Simply put: when I have a private object whose sole purpose is to serve for private lock, what do I name that object? class…
Chris Sinclair
  • 273
  • 2
  • 6
17
votes
20 answers

VB.Net vs C# debate

I've been in workplaces where, at the start of a project, the "Should we use VB.Net or C#" question has been raised. Granted, it's probably less common to have to make that decision now than it was in the early days of .Net, particularly given the…
Damovisa
  • 1,975
  • 3
  • 20
  • 23
16
votes
6 answers

Methods of debugging code (Nightmare situation)

I am frequently tasked with debugging an application at my job. It is a BI Application that we deploy to businesses, which includes a test environment, and a production environment. I am wondering if there are any apps/tools/methods that people can…
Igneous01
  • 2,343
  • 2
  • 15
  • 18
14
votes
16 answers

Should a c# dev switch to VB.net when the team language base is mixed?

I recently joined a new development team where the language preferences are mixed on the .net platform. Dev 1: Knows VB.net, does not know c# Dev 2: Knows VB.net, does not know c# Dev 3: Knows c# and VB.net, prefers c# Dev 4: Knows c# and…
jjr2527
  • 211
  • 1
  • 6
12
votes
6 answers

any document which says exactly what range of numbers are .NET BigIntegers designed for?

I'm playing around with the .NET BigInteger and basically I'm wondering what number --an estimated answer would be fine-- is the point of deviation of the curve of (the graph of (increase of time required for operations) vs (value of…
Pacerier
  • 4,973
  • 7
  • 39
  • 58
11
votes
10 answers

How do I explain to non-programers what .NET is?

I don't work at a software company, and I'm one of a small handful of people in the company that know anything about programming. I spend a lot of time automating other programs that are used in the office through public APIs, and I've also created…
Eric
  • 375
  • 2
  • 11
9
votes
7 answers

string.format with variables vs inline variables

What are the pros/cons (if any) to using string output; int i = 10; output = string.Format("the int is {0}", i); versus string output; int i = 10; output = "the int is " + i; I have always used the latter example, but it seems as though a good…
Jim
  • 641
  • 1
  • 5
  • 18
8
votes
2 answers

Is it OK to have a property of type COM object

I am developing a COM addin for Microsoft Excel, using VB.Net. I wrote a class to represent a worksheet that contains certain elements. Let's say for example it has a ListObject. I create a property for the ListObject like this: Public Class…
7
votes
2 answers

.Net Language Interoperability Gotchas

I hope this is the appropriate forum to ask this question. A group of colleagues and I just starting learning C# a few weeks ago and we are planning on having a discussion about language interoperability. So, I am looking for known/classical…
edalorzo
  • 2,634
  • 1
  • 19
  • 28
7
votes
9 answers

Review quality of code

I have been asked to quality review two code bases. I've never done anything like that, and need advice on how to perform it and report it. Background There are two providers of code, one in VB and one in C (ISO 9899:1999 (C99)). These two programs…
magol
  • 201
  • 1
  • 6
7
votes
1 answer

How in the earth CHRW produce unicode codes given that it only accept 65k possible input?

http://babelstone.blogspot.com/2005/11/how-many-unicode-characters-are-there.html says there are 1 million unicode characters and around 240k of which are already assigned. 1 million > 240k >…
user4951
  • 699
  • 6
  • 14
1
2 3
8 9