28 Şubat 2012 Salı

Soyut Sınıfların Kullanımı

using System;
class Program
{
static void Main(string[] args)
{
sinifA nesne = new sinifA();
Console.Write(nesne.ozellik);
Console.Read();
}
}
class sinifA : SoyutSinif
{
public override int ozellik
{
get
{
return 5;
}
}
}
public abstract class SoyutSinif
{
public abstract int ozellik
{
get;
}
}

Hiç yorum yok:

Yorum Gönder

evren pehlivan yazılım

evren pehlivan yazılım, evren pehlivan yazılım geliştirici