Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / December 2003

Tip: Looking for answers? Try searching our database.

Hide base members in intelllisence list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
szabeli - 10 Dec 2003 23:55 GMT
Hello,

is there a way to hide base class members so they are not
list in intellisense dropdown? i.e. I only want to see
properties and methods of my derived class. Through some
Attribute probably.... Thanks
Richard A. Lowe - 11 Dec 2003 02:49 GMT
No, I'm pretty sure there isn't.  What you could do, but which I don't
recommend unless it makes sense for your project, is have an interface that
specifies only the derived class' members, then use a variable of the
interface's type to work with your object.  That would force intellisense to
see only those members.

Richard

Signature

C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard

> Hello,
>
> is there a way to hide base class members so they are not
> list in intellisense dropdown? i.e. I only want to see
> properties and methods of my derived class. Through some
> Attribute probably.... Thanks
szabeli - 11 Dec 2003 15:35 GMT
Thanks Richard. I'll leave it as it is since I was only
looking for convinience.

>-----Original Message-----
>No, I'm pretty sure there isn't.  What you could do, but which I don't
[quoted text clipped - 13 lines]
>
>.
Richard A. Lowe - 14 Dec 2003 00:49 GMT
Actually, I seems like was wrong as others have pointed out you can do so by
applying attributes to base class methods: but I think this still is not
ideal: it only solves the problem in one case: the members will still be
non-browsable for someone using the base class.

Signature

C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard

> Thanks Richard. I'll leave it as it is since I was only
> looking for convinience.
[quoted text clipped - 23 lines]
> >
> >.
Sebastien Lambla - 11 Dec 2003 14:17 GMT
The Obsolete attribute should prevent intellisense from showing the member,
although I didn't test it.

Signature

Sebastien Lambla
http://thetechnologist.is-a-geek.com/blog/

> Hello,
>
> is there a way to hide base class members so they are not
> list in intellisense dropdown? i.e. I only want to see
> properties and methods of my derived class. Through some
> Attribute probably.... Thanks
Jaiganesh - 19 Dec 2003 08:35 GMT
Hi,
This is a fundamental question asked by many people even
they aware of it. Instead of using 'public' you just make
your properties,methods & attributes as 'protected' one.
So it will be hidden from everyone but you will be able to
access it from your derrived class.

Jai.

>-----Original Message-----
>Hello,
[quoted text clipped - 4 lines]
>Attribute probably.... Thanks
>.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.