class Program
{
static void Method()//无参数 无返回值方法
{
Console.WriteLine("欢迎使用!");
}
static void Method(int i)//有参数 无返回值方法
{
Console.WriteLine("欢迎使用版本" + i);
}
static string Method1(int i )//有参数 有返回值方法
{
Console.WriteLine("欢迎使用版本" + i);
return "会给您更好的体验";
}
static void Main(string[] args)
{
Console.WriteLine("无参数 无返回值的方法引用:");
Method();
Console.WriteLine("有参数 无返回值的方法引用");
Method(5);
Console.WriteLine("有参数 有返回值的方法引用:");
string str = Method1(6);
Console.WriteLine(str);
Console.ReadLine();
}
}