📄 program.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace Example15_2 {
class Program {
delegate string MyDelegate();
static void Main(string[] args) {
//使用委托到i的ToString()方法
int i = 10;
MyDelegate d = new MyDelegate(i.ToString);
//使用新定义的d输出i
Console.WriteLine(d());
Console.ReadLine();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -