Your error message is:
Quote:
An object reference is required for the non-static field, method, or property
It means that you're trying to access an object in non-static method. For example, if your method is:
private void ReadData(..){...}
change it to:
private static void ReadData(..){...}
More at:
Compiler Error CS0120 - C# | Microsoft Learn[
^]