CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    59

    [RESOLVED] Attributes Aliases?

    Hello,

    I'm wondering how .Net is implementing the "alias" of an attribute?

    Code:
    // using DisplayNameAttribute class.
    [DisplayName("My Name!")
    public String Foo
    { get; set; }
    As I understand, it's using the "DisplayNameAttribute" class implementation, but to call it, you can omit the "Attribute" part. Is that something that only .Net classes can do?

  2. #2
    Join Date
    Mar 2007
    Posts
    59

    Re: Attributes Aliases?

    Never mind, After writing this post it gives me an idea to test. I found out by testing that you can add the suffix "Attribute" and it will automaticly bind it...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured