static void Main(string[] args) { IApplicationContext ctx = ContextRegistry.GetContext(); IHello hello = (IHello)ctx.GetObject("MyHello"); Console.WriteLine(hello.sayHello("Mike")); }
static void Main(string[] args) { IApplicationContext ctx = ContextRegistry.GetContext(); IHello hello = (IHello)ctx.GetObject("MyHello"); string name = "Mike"; string result = hello.sayHello(name); Console.WriteLine(result); }