Would creating a Month class be practical or is that a bit overzealous? I was thinking of using it to restrict integer input to 1-12 and provide helper functions for easy conversions between strings and ints and stuff. Using .NET btw
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That is just another level of static typing beyond what .NET natively offers. It isn’t a bad thing, some languages even have it built in.
Rules for your case: