Nick
Nick

Reputation: 870

What is the difference between List<T> and List(Of T) in c#

I am confused why Microsoft documentation sometimes refer to the List class as List<T> and sometimes List(Of T).

Upvotes: 1

Views: 108

Answers (1)

CodingWithSpike
CodingWithSpike

Reputation: 43748

List(Of T)

is VB.NET syntax, and is the same as C#

List<T>

You will see it a lot in the MS documentation, because they will usually show sample code in both VB.NET and C#. You just need to pay attention to which one they are talking about.

Upvotes: 9

Related Questions