dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]TextWriter, 'standard' overriding (a little OT)


From: Rhys Weatherley
Subject: Re: [DotGNU]TextWriter, 'standard' overriding (a little OT)
Date: Mon, 14 Jan 2002 16:00:33 +1000

S11001001 wrote:

> So you can see, any Write call will eventually result in a recursive set,
> (char)->(String)->(char[])->(char[], int, int)->repeat.

This is a bug.  I missed the section that says "Write(char)" is
not implemented in "TextWriter".  i.e. it is the main "Write"
method that is supposed to be overridden in subclasses.
I've fixed this and checked in the new "TextWriter.cs" file.

> 2. Can you override methods AllTypes.xml doesn't say to? Can you NOT override
> methods AllTypes.xml tells you to?

Whatever the AllTypes.xml file says, that's how we need to
declare it.  It's odd that "Write(char)" is not abstract, but
that's just the way it is.

I suppose that theoretically one could inherit "TextWriter"
and only use "Write(string)" on the inherited class.  It would
be annoying to have to also override "Write(char)", given
that it will never be used.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]