C#中的委托数组
来源:互联网 发布:c多线程编程 pdf 编辑:程序博客网 时间:2024/05/18 08:12
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace 委托
- {
- class 委托数组
- {
- public delegate int MyDele( int value );
- public static void Main(string[] args)
- {
- MyDele[] dels = new MyDele[] { MyMathClass.CountMoney , MyMathClass.CountMoney2 };
- for (int i = 0; i < dels.Length; i++ )
- {
- //ProccesDele( dels[i] , 5 );
- Console.WriteLine( dels[i](5) );
- }
- Console.ReadLine();
- }
- //public static void ProccesDele( MyDele dele, int value)
- //{
- // int reint = dele( value );
- // Console.WriteLine( "结果:" + reint.ToString() );
- //}
- }
- class MyMathClass
- {
- public static int CountMoney(int money)
- {
- return money + money;
- }
- public static int CountMoney2(int money)
- {
- return money * money;
- }
- }
- }
- C#中的委托数组
- C#中的委托
- C# 中的委托
- C#中的委托
- c#中的委托!!!!
- c#中的委托
- [原创]c#中的委托
- 浅析C#中的委托
- C# 中的委托
- c#中的委托
- C#中的委托
- C#中的委托
- C#中的委托
- C# 中的委托类
- C# 中的委托
- C#中的委托,事件
- c#中的委托详解
- c#中的委托
- Spring 编程式事务和声明式事务(记录日志)
- 通过Chroot机制让服务器安全到底
- Struts2 Spring Hibernate 的简单整合
- 1000 A + B Problem
- c#中的委托
- C#中的委托数组
- 从oracle读出当前用户的所有表名
- 1001 Sum Problem.
- 证明析构函数隐式转换为vitual的finalize方法
- Struts 2.0的Action讲解
- 1002 A + B Problem II
- 学习JPA——Hibernate Annotation使用实例
- 关于hibernate的缓存使用(hibernate2)
- 1003 Max Sum