using System;
class Test
{
static void Main()
{
string str1=”“;
int a=3, b=5;
str1 = Console.ReadLine();
Console.WriteLine(MyMethod(str1));
Console.WriteLine(add(a,b));
}
public static DateTime MyMethod(string aName)
{
Console.WriteLine(“This is “+aName+”\n”);
return DateTime.Now;
}
public static int add(int a,int b)
{
return a + b;
}
}
方法1
