-3
に密閉されたクラスで定義された静的関数を呼び出すために、私は公共のクラスを持っており、下記のように、それは静的な機能が含まれています: -どのようにC#の
public class demo1
{
public static int GetFactorials(int number)
{
int result = 1;
for (int i = 1; i <= number; i++)
{
result *= i;
}
HttpContext.Current.Response.Write(result);
return result;
}
}
この静的関数GetFactorials
を呼び出す方法?
は '' demo1.GetFactorials(1)を試してみてください –