title: What do brackets like this { } mean when used in strings in VB.net? Where can I find the details?
body: <p>I have a about brackets like this {} in VB.net.</p>
  
  <p>I keep seeing syntax like this in MSDN documentation and in VB.net tutorials. </p>
  
  <pre><code>  Dim pattern As String = "(\d{3})-(\d{3}-\d{4})"
    Dim input As String = "212-555-6666 906-932-1111 415-222-3333 425-888-9999"
    Dim matches As MatchCollection = Regex.Matches(input, pattern)
    For Each match As Match In matches
       Console.Write("Area Code:        {0}", match.Groups(1).Value)
    Next 
  </code></pre>
  
  <p>prints:
      Area Code:        212
      Area Code:        906
      Area Code:        415
      Area Code:        425</p>
  
  <p>it seems vaguely like <code>"this is a string {0}" , variable</code>  prints 
       "this is a string " &amp; valueOfVariable.ToString</p>
  
  <p>But I have a few questions about the details of how this actually works: </p>
  
  <ol>
  <li>Does VB.net automatically assume that the curly brackets are holding a string parameter or does it depend on context. I've only seen this syntax as part of Console.WriteLine (I googled special characters vb.net 4.0 without luck)?</li>
  <li>What are the rules of when and how you can assign parameters into a string like this? </li>
  <li>Can anyone point me to the MSDN reference? What is this syntax/string trick called?</li>
  </ol>