private static void EventSample() { Coats myCoat = new Coats(); string result = myCoat.myResult; Console.WriteLine(result); }
// Advanced C Sharp Implementation private static void EventSample() { Coats myCoat = new Coats(); //Instatiate the class string result = myCoat.MyResult; // Get result from property Console.WriteLine(result); }
private static void EventSample() { Coats myCoats = new Coats(); string result = myCoats.MyResult; Console.WriteLine("My FavoriteCoats is "); }
public delegate void TryOn(string Type); //won't work in main public static void RunWeek4Classwork() { DelegateSample(); EventSample(); LambdaSample(); void LambdaSample() { LambdaExamples myLamb = new LambdaExamples(); //myLamb.MyLambdaOne(5); Console.WriteLine(myLamb.MyLambdaOne(5)); LambdaExamples mySecond = new LambdaExamples(23); Console.WriteLine(mySecond.MyLambdaOne(mySecond.MyValue)); } void DelegateSample() { Hats myHat = new Hats("Cowboy", 7); //old stuff TryOn theHat = myHat.TryOnHat; theHat("I tried on a " + myHat.HatType + " hat was size " + myHat.HatSize); Hats mySecond = new Hats(); } void EventSample() { Coats myCoat = new Coats(); //Instantiate the class string result = myCoat.MyResult; //Get results from the property Console.WriteLine(result); } }
public getAllResponse(Coats.Crafts.FASWebService.page page) { this.page = page; }