Results 1 to 3 of 3

Thread: [RESOLVED] hiding properties from base class.

  1. #1

    Thread Starter
    Fanatic Member popskie's Avatar
    Join Date
    Jul 2005
    Location
    In my chair
    Posts
    666

    Resolved [RESOLVED] hiding properties from base class.

    Hi,

    It is posible to hide properties from base class?

    sample scenario.
    I have a derive class from textbox class and I want to hide the maxlengh property for some reason.

    Thanks,

    Popskie

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: hiding properties from base class.

    Code:
    private new int  MaxLength
    		{
    			get
    			{
    				return base.MaxLength;
    			}
    		}
    This way you shadow the MaxLength in the TextBox class and end user cannot access this property
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

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