Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting list<name> in C# to VB ??

Status
Not open for further replies.

wendas

MIS
Apr 20, 2001
92
US
I have in C#

List<DateList> holidaysPassed = new List<DateList>();

I tried

Dim holidaysPassed As List<DateList>

and that doesn't work. I also have some sites that show differences between C# & VB, but none show List..
 
I think this is what you're looking for

Code:
Dim holidaysPassed As List(Of DateList) = New List(Of DateList)
 
thanks,

I also had to add an
Imports System.Collections.Generic

for VB when c# it was automatically included.. But other then that that worked.
 
Yes, you either need to use the Imports statement or use the fully qualified syntax such as:

Code:
Dim holidaysPassed As System.Collections.Generic.List(Of DateList) = New system.Collections.Generic.List(Of DateList)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top