11 2013 档案

摘要:public delegate void MyDelegate(string mydelegate);//声明一个delegate对象//实现有相同参数和返回值的函数 public void HelloDelegate(string mydelegate) { Console.WriteLine(mydelegate); }MyDelegate mydelegate = new MyDelegate(testClass.HelloDelegate);//产生delegate对象mydelegate("Hello delegate");//调用From MSDN: [C# d 阅读全文

posted @ 2013-11-25 19:58 chayu3 阅读(242) 评论(0) 推荐(0)

该文被密码保护。

posted @ 2013-11-15 00:32 chayu3 阅读(0) 评论(0) 推荐(0)

摘要:Pay attention:When using these annotations, the object itself has to be created by Spring context. If the object is instantiated in code, then this object is out-of-scope of Spring!Spring不但支持自己定义的@Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是@Resource、@PostConstruct以及@PreDestroy。 @Resource的作用相当于@Autowired. 阅读全文

posted @ 2013-11-04 20:34 chayu3 阅读(210) 评论(0) 推荐(0)