.net - How do I check if a class is readonly in c#? -


Can I write a unit test which ensures that I will write a readable class (a class that is not a setter Is the future? I do not want anyone to add a setter property to my class.

Actually, how can I check if there are no Sets in a category C?

Note: the questioner originally asked the question "How do I determine whether a class is a Is the value type? " And later changed it.

  bool isValueType = object.GetType (). IsValueType  

or

  is Bool value type = Type (YourClass). ISValueType  

MSDN:


Comments