7 Mart 2011 Pazartesi

C# virtual override

namespace sanal
{
class Temel
{
public virtual void yaz()
{
Console.WriteLine("temel");
}
}
class Tureyen:Temel
{
public override void yaz()
{
Console.WriteLine("Tureyen");
}
}
class Program
{
static void Main(string[] args)
{
Temel t = new Tureyen();

t.yaz();

Console.ReadKey();
}
}
}

0 Yorum:

Yorum Gönder

Kaydol: Kayıt Yorumları [Atom]

<< Ana Sayfa