I am getting an error “An object reference is required for the non-static field, method, or property ‘Excel1.Program.GetAllTemplateNames(string, string)” I know this is pretty silly but I am quite new to C# and could do with some assistance in debugging this code. Is it even possible to call a static function from a Main function? Am having these doubts.
Share
Change this line
to
or make the method static.