我在一个工具类呼叫实用工具类的函数
namespace GUI.code
{
public class Utility
{
public string GetFileName(string grpID)
{
string filenameUNC = "\\\\" + "localhost" + "\\AgentShare\\";
string realPath = GetPath(filenameUNC);
return realPath;
}
}
}
现在我从另一个调用页面此功能在项目中像这样有一个函数:
new utility.GetCSFileName(ID);
为什么我需要添加新的,我为什么不能这样称呼它
GetCSFileName(ID);
当我有
using GUI.code;
在顶部
如果删除新我得到这个错误
错误1的对象引用是所必需的非静态字段,方法或属性“copiunGUI.code.GUIUtility。 GetCSFileName(串)
任何建议