Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Anne myAnnee = new Anne();

            String message = myAnnee.MessageAnneChoisir(dateTimePicker1.Value);

            MessageBox.Show(message);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Anne myAnne = new Anne();

            Console.WriteLine("SVP enter ton annee de naissance dd-mm-yyyy:");
            String input = Console.ReadLine();

            String[] date = input.Split('-');

            //Console.WriteLine(date[2]);

            DateTime myDate = new DateTime(int.Parse(date[2]), int.Parse(date[1]), int.Parse(date[0]), 0, 0, 0);



            Console.WriteLine(myAnne.MessageAnneChoisir(myDate));

            Console.ReadKey();
        }