Yes you can, but you should not lock on this
to avoid deadlocks. Use something like:
public class Server
{
private object lockObject = new object();
public string Name { get; set; }
public void DoTheJob()
{
lock(lockObject)
{
//MoreCode
}
}
}
If you also want to avoid the reading of Name
you would need to implement a getter and setter which also use the same lock
.