• Saves Valuable Time
  • Trusted Accuracy for 12 Years
  • 15-Day Money-Back Guarantee

C# Equivalent to VB Collection Initializers

In VB, the keyword 'From' is used to initialize collections within a variable declaration.

VB.NET C#
Dim digits As New List(Of Integer)() From {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} List<int> digits = new List<int>() {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};


Use Instant C# to convert from VB.NET to C#.     

Additional resource: VB.NET and C# Equivalents


Copyright © 1997 – 2017 Tangible Software Solutions Inc.