What’s in a name? (C#’s hidden support for structural typing)

http://togaroga.com/2010/04/whats-in-a-name-cs-hidden-support-for-structural-typing/
by andrewhare • 16 years ago
23 7 16 years ago

C# is well known for its nominative type system. This means that C# identifies types and their relationships based on their names. That is why C# does not allow you to create two types with the same name, even if they have a different public interface – the C# compiler only cares about the name of the type.

Related Stories

Loading related stories...

Source preview

togaroga.com