Unfortunately, since these methods is overridden from the base class, even
if you did succeed hiding you overridden
version, the version of the base class will still be visible through
IntelliSense(reflection).
Do you have to derive that class?
If there are several abstract members that you do not actually implement,
does it really makes sense to
derive this class?
If the base class declares members as abstract, it really means it demands
an implementation of those members.
If you are in control of the base class, there could be lots of solutions,
though.
You could define two abstract base classes, one basic and one extended
that derives the basic one.
Or you could place the methods in an interface, and have those concrete
classes
that actually do implement the extended funtionality implement that
interface.
Well, it is just my opinion, although I probably did not provide much
help.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
Lars-Erik Aabech said:
I know about that one
My current implementations of the methods throw a
NotImplementedException.. But why show the method at all if that's what
it does?
L-E
Dennis Myrén said:
I do not think there is anything for that.
Although the name of the class System.ComponentModel.BrowsableAttribute
implies
it does this, it is for controlling which properties of a visual
designer to be shown in the properties window.
http://msdn.microsoft.com/library/d...omponentModelBrowsableAttributeClassTopic.asp
But anyway, since you have to override a public member of a base class,
that member will be visible anyway.
Just throw a NotImplementedException or a NotSupportedException.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
Hi!
I've been looking around for an attribute that tells the intellitip
thingy to skip some field or operation. Is there any?
IE. a ListControl object has the DataSource property, but not all of
the inherited classes "supports" that public property, although you can
use them. Some of these properties are hidden from intellitip, but
doesn't throw a compiler error.
Ex.:
[Invisible(true)]
public bool NotImplementedBoolean
{
// need this to derive from an abstract class.
}
L-E