Hey all!

In a console app, you can condense strings by using this code on line 5:

vb Code:
  1. Dim R As New Random()
  2. Dim l As Int32 = R.Next(10)
  3. Dim m As Int32 = R.Next(10)
  4. Dim n As Int32 = R.Next(10)
  5. Console.WriteLine("L is {0} and M is {1} and N is {2}.", l, m, n)
  6. Console.ReadLine()

But why can't you create a normal string that way? Is the long way the only other way to do it?

vb Code:
  1. '' How do I go from this:
  2. Dim s As String = "L is " & l & " and M is " & m & " and N is " & n & "."
  3. '' To this:
  4. Dim s As String = ("L is {0} and M is {1} and N is {2}.", l, m, n)

Thanks!

Nic