static class instances not allowed?

Eric eric at makechip.com
Tue Jun 11 08:45:09 PDT 2013


>> Why aren't static class instances allowed?  Is there a 
>> work-around,
>> or alternative approach to this?
>
> C# compilers present bugs with a standard number, like:
>
> myprog.cs(7,60): error CS1525: .......
>
> This is useful because you can then write an explanation page 
> for each of those bugs, like CS1525:
>
> http://msdn.microsoft.com/en-gb/library/3hdyz4dw%28v=vs.80%29.aspx
>
> In such pages you can explain why Only const or immutable class 
> thread local variable are allowed.
>
> Bye,
> bearophile

I'm not sure what you are saying.  Are you implying that not 
allowing
static class instances is a compiler bug?

-Eric



More information about the Digitalmars-d-learn mailing list