using System;
class SampleClass
{
public void printOut(string name,int age)
{
Console.Write("名前:{0} ",name);
Console.WriteLine("年齢:{0}",age);
}
}
class MainClass
{
static void Main()
{
SampleClass sample1 = new SampleClass();
SampleClass sample2 = new SampleClass();
SampleClass sample3 = new SampleClass();
sample1.printOut("Kamimura1", 1);
sample2.printOut("Kamimura2", 2);
sample3.printOut("Kamimura3", 3);
}
}
0 コメント:
コメントを投稿