In C#, if we have a class 'Employee' and it will have a property called 'Code' that must consist of 7 characters in the following format: (A-Z) + (1-9)+(0-1)+(0001-9999)
for example 'Code' = A501234 or Z910002
So if we make a property 'Code' in the Class 'Employee' is there any way to force developer when 'Code' is set, to check if it is in the prev format or at least force him to set it to 7 characters, so that, for example, it can cause compiler or build errors?
Thanks in advance for expected cooperation