How to have access to instance members in a static method?
问题 I'm trying to create classes to encapsulate validation and logic for objects like Email , URL , phone number and so on . in the first try I found that I'm repeating the same code in all classes specially static IsValid and the Constructor . so I decided to create a base class to put all the same codes in it . so there is a base class that other classes inherit it . it's abstract as I don't want it to be used directly . public abstract class BaseClass { protected string value; private bool