I have this object that many insrances using from different threads:
Private static var _selectedIntrerface;
public static Interfaces SelectedIntrerface
{
get { return _selectedIntrerface; }
set { _selectedIntrerface= value; }
}
So my question is very simple: should i declare it this way:
Private static volatile var _selectedIntrerface;
public static volatile Interfaces SelectedIntrerface
{
get { return _selectedIntrerface; }
set { _selectedIntrerface= value; }
}
- Update
This object not modified, only accessed.