Maha

Maha

  • NA
  • 0
  • 169.5k

Automatic display of a character

Feb 21 2012 2:34 PM
Suppose we have to input data for date of birth. Let we say 11/23/1998 (mm/dd/yyyy). In practice we have to input 11 then we have to input / and so on. I wish to know whether it is possible when we input 11 display will be 11/ that means / will automatically come with 11. 

using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.Write("DOB mm/dd/yyyy ");
string s = Console.ReadLine();

Console.ReadKey();
}
}
}

Answers (3)