E
Eric
I have some questions about the volatile keyword...
1) If I use the volatile keyword with a reference type such as a class like
so:
public volatile UserTotals totals = new UserTotals();
Are the fields of the class also protected? Or is it just the 4-8 byte
reference to the object that is protected?
2) Why doesn't volatile support 64bit and 128bit data types such as ulong or
decimal?
3) In the MSDN documentation, it says that all static members are
thread-safe. So why do code examples in the MSDN documentation use the
volatile keyword with static members?
Thanks
1) If I use the volatile keyword with a reference type such as a class like
so:
public volatile UserTotals totals = new UserTotals();
Are the fields of the class also protected? Or is it just the 4-8 byte
reference to the object that is protected?
2) Why doesn't volatile support 64bit and 128bit data types such as ulong or
decimal?
3) In the MSDN documentation, it says that all static members are
thread-safe. So why do code examples in the MSDN documentation use the
volatile keyword with static members?
Thanks