Should be fairly straight forward I have a property for a phone number and I want to be sure that only the numeric values are "stored"
So lets say we have something like:
private string _phone; public string Phone { get { return _phone; } set { if (IsNumeric(value)) { _phone = value; } else { _phone = StripPhone(value); } } }I believe I've done something similar in VB and it worked, yet not in C#? IsNumeric and StripPhone are functions. I can't find any examples that are similar to this so hopefully someone can point me in the right direction.