I have a function in a utility class
namespace GUI.code
{
public class Utility
{
public string GetFileName(string grpID)
{
string filenameUNC = "\\\\" + "localhost" + "\\AgentShare\\";
string realPath = GetPath(filenameUNC);
return realPath;
}
}
}
now i call this function from another page in the project like this:
new utility.GetCSFileName(ID);
why do i need to add new, why cant i call it like
GetCSFileName(ID);
when i have
using GUI.code;
on top
if i remove new i get this error
Error 1 An object reference is required for the non-static field, method, or property 'copiunGUI.code.GUIUtility.GetCSFileName(string)
any suggestions