S
sahel
Hi I wrote this program but it has error plz help me to solve it
Errore:
Error 1 An object reference is required for the non-static field,
method, or property
using System;
namespace ConsoleApplication85
{
class Program
{
static void Main(string[] args)
{
}
class f
{
protected int d = 10;
}
class g:f
{
static public void tabe()
{
Console.WriteLine(d);
}
}
}
}
and i don't really know what is the usage of inheritance
Errore:
Error 1 An object reference is required for the non-static field,
method, or property
using System;
namespace ConsoleApplication85
{
class Program
{
static void Main(string[] args)
{
}
class f
{
protected int d = 10;
}
class g:f
{
static public void tabe()
{
Console.WriteLine(d);
}
}
}
}
and i don't really know what is the usage of inheritance