I have a textbox where users can enter a year "YY" and I am parsing it using:
int year;
if (int.TryParse(txtYear.Text, out year))
{
args.Year = year;
}
The problem is TryParse will convert '07' into '7' and my method is expecting the year to be in the format YYYY (e.g. input "07" should be "2007"). What is the best way to do this conversion?