Hello!

I'm trying to use following code:

<======================================>
//...

class A
{
        private
        {
                int m_someVar = 10;
        }

        public
        {
                this()
                {
                }
        }
}


int main(string[] args)
{
        shared A a = null;
        a = new shared(A)(); // error.

        return 0;
}
<======================================>

And on compile time, the compiler says "Error: non-shared method main.A.this is not callable using a shared object". How can I use an objects as shared, which classes were not defined with "synchronized" or "shared" keyword?


Thanks.

Reply via email to