예제 #1
0
        //default constructor
        public Hats()
        {
            //assinging method to delegate. Tryonhat methods assined to delegate
            //my object of the delegate
            TryHat myHat = TryOnHat;

            TryALargerHat("fadora", 7, myHat);
        }
예제 #2
0
 public void TryALargerHat(string type, int oldSize, TryHat another)
 {
     another("I triedon a " + type + " hat at size " + (oldSize + 1).ToString());
 }
예제 #3
0
        public Hats()
        {
            TryHat myHat = TryOnHat;

            TryALargerHat("Fedora", 7, myHat);
        }
예제 #4
0
        public Hats()
        {
            TryHat myHat = TryOnHat;

            TryALargeHat("fadora", 7, myHat);
        }
예제 #5
0
파일: Hats.cs 프로젝트: robwillob/FirstApp
 public void TryALargerHat(string type, int oldSize, TryHat another) //this is a pointer to the TryHat method
 {
     another("I tried on a " + type + " hat at size " + (oldSize + 1).ToString());
 }
예제 #6
0
파일: Hats.cs 프로젝트: robwillob/FirstApp
        public Hats()                          //constructor takes no parameters
        {
            TryHat myHat = TryOnHat;           //we are assigning method to the delegate

            TryALargerHat("Fadora", 7, myHat); //method
        }
예제 #7
0
        //tryon=delegate

        public void TryALargerHat(string type, int oldSize, TryHat another)
        //constructor no parameters
        {
            another("I tried on a " + type + " hat at size " + (oldSize + 1).ToString());
        }