コード例 #1
1
ファイル: Form1.cs プロジェクト: jcolas/CodeProjects
        //a more typical way to create employee objects
        private void button3_Click(object sender, EventArgs e)
        {
            Employee objE1 = new Employee();
            objE1.EmployeeId = 1;
            objE1.Name = "Tim Thomas";
            objE1.DOB = DateTime.Parse("1/1/1980");
            objE1.Gender = Gender.Male;

            MessageBox.Show(objE1.GetData());

            Employee objE2 = new Employee(2, "Jill James", DateTime.Parse("1/2/1990"), Gender.Female);
            MessageBox.Show(objE2.GetData());
        }