public override void farewell(Publisher publisher, SubscriberStub subStub) { if (Greeter != null) { Greeter.Farewell(TypedPublisher, subStub); } }
public override void farewell(Publisher publisher, string nodeId, string subId) { if (Greeter != null) { Greeter.Farewell(TypedPublisher, nodeId, subId); } }
static public void Main(String[] args) { Console.WriteLine("Please Input Your Name."); string name = Console.ReadLine(); DateTime time = DateTime.Now; Greeter g = new Greeter(); g.Hello(name); g.Farewell(name); g.TimeOfDay(name, time); Console.ReadLine(); }
//Challenge 4. New up an instance of your greeter class inside your main. Calling all methods built out static void Main(string[] args) { Greeter greeter = new Greeter(); Console.WriteLine("Please, type your name"); string name = Console.ReadLine(); greeter.Hello(name); greeter.TimeOfDay(); greeter.Farewell(name); Console.ReadLine(); }