Re: C# inheritance broken?





<groups@xxxxxxxxxxxxx> wrote in message news:1169837076.386389.190580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ignacio,

Thank you for your thoughts.

The Document class does have a public default constructor, and it is
not sealed. I have no problem creating a "new" Document object, or a
"new" MyDocument object, for that matter. What I can't do is "convert"
an existing Document object (such as the one returned by Document.Load)
into a MyDocument.

Tony


.



Relevant Pages

  • Re: C# inheritance broken?
    ... The Document class does have a public default constructor, ... an existing Document object ... | class MyDocument: public Document ... 2- It's declared private ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# inheritance broken?
    ... class MyDocument: public Document ... Document object to a MyDocument object. ... So my conclusion is that C# inheritance is broken because ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Which GoF Design Pattern to choose?
    ... This is why you introduce an abstract document class and then subclass ... We create a docSource class. ... class bbcSource implements docSource { ... BY instantiating the right kind of document object ...
    (comp.programming)
  • Re: C# inheritance broken?
    ... to create a new Document object. ... if they design one that requires you to ... don't have any problem creating a new MyDocument object when I need it; ... public static Document Load(string FileName); ...
    (microsoft.public.dotnet.languages.csharp)
  • C# inheritance broken?
    ... class MyDocument: public Document ... Document object to a MyDocument object. ... So my conclusion is that C# inheritance is broken because ...
    (microsoft.public.dotnet.languages.csharp)