C# Language Question: priority of matching
<p>I'm reading book "C# Language", and hit this example from Page 123-124:</p>

<p>The meaning of a name within a block may differ based on the context in which the name is used. </p>

<p>In the example</p>

<pre><code>using System;
class A { }
class Test
{
  static void Main()
  {
    string A = "hello, world";
    string s = A; // Expression context
    Type t = typeof(A); // Type context
    Console.WriteLine(s); // Writes "hello, world"
    Console.WriteLine(t); // Writes "A"
  }
}  
</code></pre>

<p>the name A is used in an expression context to refer to the local variable A and in a type
context to refer to the class A.</p>

<p>I'm fine with the visibility of class A. However, here (<code>Type t = typeof(A)</code>) class <code>A</code> preceded string <code>A</code>.
So, what is the "priority" or "sequence" of matching/choosing a possible "A"?</p>
