C# 0 The Complete Reference


PART I C h a p t e r   1 2



Download 4,07 Mb.
Pdf ko'rish
bet417/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   413   414   415   416   417   418   419   420   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt


PART I

C h a p t e r   1 2 :  

I n t e r f a c e s ,   S t r u c t u r e s ,   a n d   E n u m e r a t i o n s  

323


PART IPART I

  }


}

class IFExtend {

  static void Main() {

    MyClass ob = new MyClass();

    ob.Meth1();

    ob.Meth2();

    ob.Meth3();

  }


}

As an experiment, you might try removing the implementation for 



Meth1( )

 in 


MyClass

.

This will cause a compile-time error. As stated earlier, any class that implements an interface 



must implement all methods defined by that interface, including any that are inherited from 

other interfaces.



Name Hiding with Interface Inheritance

When one interface inherits another, it is possible to declare a member in the derived 

interface that hides one defined by the base interface. This happens when a member in a 

derived interface has the same declaration as one in the base interface. In this case, the base 

interface name is hidden. This will cause a warning message unless you specify the derived 

interface member with 




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   413   414   415   416   417   418   419   420   ...   1096




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish