[Mono-list] Problem with inheritance
Sat, 14 Jul 2001 18:27:37 -0700
According to the documentation, System.Web.UI.TemplateParser doesn't have a
property called DefaultBaseType. So it must not be a public or protected
member. When I compile your sample, I get the same error along with an error
that says: "no suitable method found to override".
Your IL snippet shows the access as being "assembly". Is it possible that
the compiler can't find the DefaultBaseType property because your new class
isn't in the same assembly as TemplateParser and therefore doesn't have
access to it?
Since PageParser is sealed, I can't think of a workaround other than
implementing all of the classes in the hierarchy yourself.
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com]On
> Behalf Of Sebastien Lambla
> Sent: Sunday, July 15, 2001 3:02 AM
> To: firstname.lastname@example.org
> Subject: [Mono-list] Problem with inheritance
> Hello all,
> I can't seem to see where my problem lies. I'm trying to implement the
> PageParser class. Here's the partial code:
> public sealed class PageParser : TemplateControlParser
> protected override Type DefaultBaseType
> return null;
> The compiler keep on telling me System.Web.UI.PageParser does not
> inherited abstract class member
> The DefaultBaseType property is an abstract defined in the TemplateParser,
> and TemplateControlParser inherits from it.
> What am I doing wrong? Here is the metadata on this property :
> .property instance class [mscorlib]System.Type
> .method assembly hidebysig specialname virtual
> instance class [mscorlib]System.Type
> get_DefaultBaseType() cil managed
> I'm sure I'm missing a very simple thing, but can't seem to go nowhere...
> Sebastien Lambla
> Mono-list maillist - Monoemail@example.com