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

VB Equivalent to C# Collection Initializers

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

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


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

Additional resource: VB.NET and C# Equivalents


Copyright © 1997 – 2017 Tangible Software Solutions Inc.