Daniel Lidström <so*****@microsoft.com> wrote:
On Wed, 22 Sep 2004 08:38:32 +0100, Jon Skeet [C# MVP] wrote:
Daniel Lidström <so*****@microsoft.com> wrote: What is the reason for C3842?
'function': 'const' and 'volatile' qualifiers on member functions of
managed types are not supported
The CLR just doesn't have the concept of const or volatile except for
fields.
Isn't this a compile-time issue?
Not really. Unless the CLR has some concept of "constness", it won't be
in the assembly format, which means you wouldn't be able to use it when
compiling against other libraries.
You could have constness for internal methods and types (if C# had such
a concept, which it doesn't) but it wouldn't be very elegant to be so
restricted.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too