C# 0 The Complete Reference


MyMethod( )  is sealed by  D



Download 4,07 Mb.
Pdf ko'rish
bet399/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   395   396   397   398   399   400   401   402   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

MyMethod( )

 is sealed by 



D

, it can’t be overridden by 



X

.

The object Class

C# defines one special class called 

object

 that is an implicit base class of all other classes and 

for all other types (including the value types). In other words, all other types are derived 

from 


object

. This means that a reference variable of type 



object

 can refer to an object of any 

www.freepdf-books.com



306

 

P a r t   I :  



T h e   C #   L a n g u a g e

other type. Also, since arrays are implemented as objects, a variable of type 



object

 can also 

refer to any array. Technically, the C# name 

object

 is just another name for 



System.Object

,

which is part of the .NET Framework class library.



The

object

 class defines the methods shown in Table 11-1, which means that they are 

available in every object.

A few of these methods warrant some additional explanation. By default, the 



Equals(object)

method determines if the invoking object refers to the same object as the one referred to by 

the argument. (That is, it determines if the two references are the same.) It returns 

true

 if the 


objects are the same, and 

false

 otherwise. You can override this method in classes that you 

create. Doing so allows you to define what equality means relative to a class. For example, 

you could define 



Equals(object)

 so that it compares the contents of two objects for equality. 

The


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   395   396   397   398   399   400   401   402   ...   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