On Thu, 13 Jun 2013 15:47:22 -0400, Agustin
<[email protected]> wrote:
I would like to know if static members are shared between 2 library. For
example:
Class A
{
static uint var;
}
From Library A:
A::var = 3;
From Library B:
if( A::var == 3 )
...
Its this possible? if not, its any way to make it happend?
It's possible, and works just like you have it (syntax is slightly
different, use A.var)
However, static means "thread local" So you can't access the same A.var
from multiple threads.
To access from multiple threads, declare var like:
shared static uint var;
-Steve