示例#1
0
        static void Main7()
        {
            MyDate d1 = new MyDate(12, 10, 2010);

            Console.WriteLine(d1.day);
            d1.day = 21;
        }
示例#2
0
        public override bool Equals(object obj)
        {
            MyDate d = (MyDate)obj;

            if (this.dd == d.dd &&
                this.mm == d.mm &&
                this.yy == d.yy)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
 public Person(string nm, int d, int m, int y)
 {
     name = nm;
     dob  = new MyDate(d, m, y);
 }
示例#4
0
 public Person()
 {
     name = "";
     dob  = new MyDate();
 }