Collection initializer in VB 2008

  • Thread starter Thread starter Gilbert Tordeur
  • Start date Start date
G

Gilbert Tordeur

Hello,

Since C# 2008 it is possible to initialize a collection like" this :

var digits = new List<int> {0, 1, 2};

Is it also possible in VB 2008, and with what syntax ?

Thank you,
Gilbert
 
There is no 'short-form' for specifying the initial value array (the answer
by Bill is the equivalent, but is not a new 'short-form'). This was
originally planned for VB 2008, but was shelved - I'd guess it will be in the
next version.
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
 
Back
Top