示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     //var host=new DateStringClient();
     var host=new SocialSecurityNumberClient();
     //label1.Text = host.ReturnIfCorrectDate(textBox1.Text);
     label1.Text = host.CheckIfValid(textBox1.Text);
 }
 protected void Button1_Click(object sender, EventArgs e)
 {
     //var host=new DateStringClient();
     var host=new SocialSecurityNumberClient();
     //Label1.Text = host.ReturnIfCorrectDate(TextBox1.Text);
     Label1.Text = host.CheckIfValid(TextBox1.Text);
 }
        static void Main(string[] args)
        {
            //var host=new DateStringClient();
            var host=new SocialSecurityNumberClient();

            //Console.WriteLine("Skriv in ett datum: ");
            //var date = Console.ReadLine();
            //Console.WriteLine(host.ReturnIfCorrectDate(date));
            Console.WriteLine("Skriv in ett personnummer: ");
            var number = Console.ReadLine();
            Console.WriteLine(host.CheckIfValid(number));
            Console.ReadKey();
        }