C# 0 The Complete Reference


Queue . It implements the  ICollection



Download 4,07 Mb.
Pdf ko'rish
bet957/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   953   954   955   956   957   958   959   960   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

    Bu sahifa navigatsiya:
  • Queue
Queue

. It implements the 



ICollection

,

IEnumerable

, and 

ICloneable

 interfaces. 



Queue

 is a dynamic collection that grows as 

needed to accommodate the elements it must store. When more room is needed, the size 

of the queue is increased by a growth factor, which, by default, is 2.0.



Queue

defines the following constructors:

public Queue( )

public Queue (int 



capacity

)

public Queue (int 



capacity

, fl oat 


growFact

)

public Queue (ICollection 



c

)

The first form creates an empty queue with an initial capacity of 32 and uses the default 



growth factor of 2.0. The second form creates an empty queue with the initial capacity 

specified by 



capacity

 and a growth factor of 2.0. The third form allows you to specify a 

growth factor in 

growFact

 (which must be between 1.0 and 10.0). The fourth form creates 

a queue that contains the elements of the collection specified by 

c,

and an initial capacity 

equal to the number of elements. In this form, the default growth factor of 2.0 is used.

In addition to the methods defined by the interfaces that it implements, 



Queue

 defines 

the methods shown in Table 24-8. In general, here is how you use 

Queue

. To put an object 

in the queue, call 

Enqueue( )

. To remove and return the object at the front of the queue, 

call


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   953   954   955   956   957   958   959   960   ...   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