Given this code:
List things = new List(); foreach (string thing in things) { string foo = thing.ToUpper(); } string foo =
While you can only refer to the outer foo after you declared it, locals are allocated at the beginning of a function which means the inner foo will overshadow the outer one, even if it hasn't been declared yet.
foo