C# メソッドのパラメーター

using System;

namespace Sample2
{
class TestClass
{
public int CalcAdd(int a, int b)
{
return a + b;
}
}
class MainClass
{
static void Main()
{
TestClass test = new TestClass();

        int p = 4;
        int a = test.CalcAdd(3, p);
        Console.WriteLine(a);
    }
}

}

投稿者: chosuke

趣味はゲームやアニメや漫画などです

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です