Click here to Skip to main content
15,891,704 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Hiding inherited properties

Rate me:
Please Sign up or sign in to vote.
4.67/5 (2 votes)
2 Oct 2011CPOL 5.1K   2  
[Browsable(fal...
C#
[Browsable(false), Bindable(false),
    DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
    EditorBrowsable(EditorBrowsableState.Never)]
public override string Text
{
    get { return base.Text; }
    set { base.Text = value; }
}


Here, if you specify DesignerSerializationVisibility.Hidden, the code generator does not produce code for the object.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Student
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --