我有以下几点:访问变量
public ActionResult GetRpt(string pNum)
{
string dirPath = "C:\\Folder1";
string pvtResult = GetType1Report(pNum);
}
private string GetType1Reportt(string paslNum)
{
string dPath = dirPath;
}
我需要从内GetType1Report访问dirPath。
我得到一个消息,dirPath不存在于GetPReport中。
使用GetPReport访问dirPath的最佳方式是什么?我正在考虑将此视为公共静态,但不确定这是否是最好的方式。
是什么?GetPReport –