私は次のものを持っています:
public ActionResult GetRpt(string pNum)
{
string dirPath = "C:\\Folder1";
string pvtResult = GetType1Report(pNum);
}
private string GetType1Reportt(string paslNum)
{
string dPath = dirPath;
}
GetType1Report 内から dirPath にアクセスする必要があります。
GetPReport に dirPath が存在しないというメッセージが表示されます。
GetPReport から dirPath にアクセスする最良の方法は何ですか? これを public static にすることを考えていましたが、これが最善の方法であるかどうかはわかりませんでした。