Playing with Types – Non-unique property and field names

July 30, 2009

This post has moved here.

Advertisements

4 Responses to “Playing with Types – Non-unique property and field names”


  1. Hi Riaan,
    maybe I am missing something. What is so special about that code?

    Thanks
    huseyn

  2. Huseyn Says:

    Hi,
    I see now. That is cool, maybe not very useful and a little bit dangerous. But did you find a way to use that in C#?

    Thanks.

    • Riaan Hanekom Says:

      We can, with some careful reflection. I say careful, because finding properties by name will throw an exception in this case.

      Other than that, I can’t see you accessing these properties normally in C# as the language doesn’t allow for properties to be defined in that way.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: