I have an issue with an error I am getting in Vs2019, to do with non static fields using C# and would be grateful for some assistance
This is my method:
I have tried to debug code and made changes but cant find solution
public void getrecs ()
{
SomeModel model = ServiceObj.ListServiceData(id, dStart, dEnd);
}
//Getting error on VS2019 - ServiceObj.ListServiceData
//CS0120 An object reference is required for the nonstatic field, method, or property 'member'
internal class ServiceObj : IServiceObj
{
//This is ListServiceData
public IEnumerable<IEventDays> ListServiceData(Guid id, DateTime startDate, DateTime endDate)
{
}
}