Solution : An object reference is required for the nonstatic field, method, or property 'member'
class Program
{
static void
{
sayhello();
}
public void sayhello()
{
Console.WriteLine("Hello World!");
}
}
In order to use a non-static field, method, or property, you must first create an object instance.
static void
{
Program mp = new Program();
mp.sayhello();
mp.find_defaulter();
}
public void sayhello()
{
Console.WriteLine("Hello World!");
}
Non Static Error Dialog
C# Console Output
No comments:
Post a Comment