<configSections>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="config://spring/objects"/>
</context>
<objects xmlns="http://www.springframework.net">
<object id="mySayHello" type="IocInCSharp.SayHello, SayHello">
<property name="HelloGenerator">
<ref object="myCnHelloGenerator"/>
</property>
</object>
<object id="myEnHelloGenerator" type="IocInCSharp.EnHelloGenerator, HelloGenerator"/>
<object id="myCnHelloGenerator" type="IocInCSharp.CnHelloGenerator, HelloGenerator"/>
</objects>
</spring>IApplicationContext ctx = ConfigurationSettings.GetConfig("spring/context") as IApplicationContext;            ISayHello sayHello = (ISayHello)ctx.GetObject("mySayHello");
            sayHello.SayHelloTo("zhenyulu");
            Console.ReadKey();
为什么总是报异常:
创建 spring/context 的配置节处理程序时出错: 调用的目标发生了异常