title: Namespace references in C# vs. VB.Net
body: <p>In VB.Net you can do something like the following without any issues... just ignore the fact that this is a pretty useless class :-)</p>
  
  <pre><code>
  Imports System
  
  Public Class Class1
      Public Shared Function ArrayToList(ByVal _array() As String) As Collections.Generic.List(Of String)
          Return New Collections.Generic.List(Of String)(_array)
      End Function
  End Class
  </code></pre>
  
  <p>However if you do the same thing in C#...</p>
  
  <pre><code>
  using System;
  
  public class Class1
  {
      public static Collections.Generic.List ArrayToList(string[] _array)
      {
          return new Collections.Generic.List(_array);
      }
  }
  </code></pre>
  
  <p>You will get an error on the line with the return on "Collections.Generic.List" saying "The type or namespace name 'Collections' could not be found (are you missing a using directive or an assembly reference?)"</p>
  
  <p>I know that you have to actually have a using directive to System.Collections.Generic to use List but I don't know <em>why</em>.  I also don't understand why I don't get the same error in the function declaration, but only in the return statement.</p>
  
  <p>I was hoping someone can explain this or even refer me to a technet page that explains it.  I have searched around, but can't find anything that explains this concept.</p>
  
  <p>Edit: Just to note, the question is really about the referencing of a sub-namespace such as in the example being able to reference Collections within System.</p>