C # text mask
I need to check for a specific property on one of my classes. When I set the property, the class has to validate the input and if it is invalid, set the object to an invalid state.
Question. The property value must be in a specific mask / format, for example. && & & - && & & - && & &. I cannot use regular expressions. Can text be checked for mask value?
thank
source to share
Is it possible to check text against mask value?
It is of course possible that you can write a function to take a string and a mask and check against one another.
So, I don't understand what you are asking about, asking if there are functions in the standard .Net libraries? Or ask for an implementation of the mask check function? Or something else?
If you are looking for something in the library to help, the MaskedTextProvider will probably do it, although it will overdo it.
source to share