c# tilida kortej yaratish

DOCX 6 pages 29.7 KB Free download

Page preview (5 pages)

Scroll down 👇
1 / 6
1. c# tilida kortej qanday e’lon qilinadi? =tuple mytuple = new tuple(); =var tuple = new tuple (); =var tuple = (1, "hello"); =var tuple = new[] { 1, "hello" }; 2. c# kortej elementiga qanday murojaat qilinadi? =tuple.element1 =tuple.item1 =tuple[0] =tuple->item1 3. quyidagilardan qaysi biri c# da kortej yaratishning to‘g‘ri usuli? =var person = ("john", 25); =tuple person = ("john", 25); =var person = new[] { "john", 25 }; =var person = tuple("john", 25); 4. kortej elementlarini nomlash qanday amalga oshiriladi? =var tuple = (string name = "john", int age = 25); =var tuple = (name: "john", age: 25); =var tuple = ("john": name, 25: age); =var tuple = tuple(name: "john", age: 25); 5. kortej elementlariga nom orqali qanday murojaat qilinadi? =tuple.name =tuple.item1 =tuple["name"] =tuple->name 6. kortejni qiymat sifatida qaytarish uchun metod qanday yoziladi? =(int, string) getdata() { return (1, "hello"); } =tuple getdata() { return (1, "hello"); } …
2 / 6
e.item1); =1 =item =null =sintaksis xato 16. kortejlar murojaatli turmi yoki qiymatli turmi? =value type =reference type =ikkala holatga ham ega =static type 17. quyidagi kod natijasi nima bo‘ladi? var tuple1 = (1, 2); var tuple2 = (1, 2); console.writeline(tuple1 == tuple2); =true =false =compile error =exception 18. quyidagi kod natijasi nima bo‘ladi? var tuple1 = (1, 2); var tuple2 = (2, 1); console.writeline(tuple1 == tuple2); =true =false =compile error =exception 1. sanab o’tiluvchi tur c# da qanday e'lon qilinadi? =enum color { "red", "green", "blue" } =enum color { red, green, blue } =enum color { red = 1; green = 2; blue = 3; } =color = enum { red, green, blue }; 2. sanab o’tiluvchi tur elementlarining asosiy qiymati qanday belgilanadi? =string =boolean =int =double 3. quyidagi sanab o’tiluvchi tur elementlarining qiymatlari qanday bo‘ladi? enum days { monday, tuesday, wednesday }; =monday=0, tuesday=2, wednesday=4 =monday=0, tuesday=1, wednesday=2 …
3 / 6
(status), 1) =(status)1 =convert.toenum(1) =status(1) 9. quyidagi sanab o’tiluvchi tur turlarini qanday qilib string ga aylantirish mumkin? enum status{ inactive = 0, active = 1, pending = 2} =status.active.tostring() =tostring(status.active) =enum.parse(status.active) =status.active.totext() 10. quyidagilardan qaysi biri sanab o’tiluvchi tur qiymatini tekshirish uchun ishlatiladi? enum status{ inactive = 0, active = 1, pending = 2} =if (status == "active") =if (status.equals("active")) =if (status == status.active) =if (status.equals(status.active)) 11. sanab o’tiluvchi tur uchun flags atributi nima uchun ishlatiladi? =enum ni stringga aylantirish uchun =bir nechta qiymatlarni kombinatsiyalash uchun =enum ni default qilish uchun =enum qiymatlarini faqat int qilish uchun 12. quyidagi sanab o’tiluvchi tur flags atributi bilan qanday ishlatiladi? [flags] enum access { none=0, read=1, write=2, execute=4 } =access.read + access.write =access.read | access.write =access.read & access.write =access.read || access.write 13. quyidagi kodda flags orqali natija qanday bo‘ladi? [flags] enum permission { none=0, read=1, write=2, execute=4 } var userperm = permission.read | …
4 / 6
ng type) sifatida qanday tiplar bo‘lishi mumkin? =string =double =byte, sbyte, short, ushort, int, uint, long, ulong =bool 19. quyidagi sanab o’tiluvchi tur qanday qiymatlarga ega bo‘ladi? enum example : byte { a, b, c } =a=1, b=2, c=3 =a=0, b=2, c=4 =a=0, b=1, c=2 =a=byte, b=byte, c=byte 1. c# da struktura qanday e'lon qilinadi? =struct point { public int x; public int y; } =struct point { int x; int y; } =structure point { int x; int y; } =point struct { int x; int y; } 2. struktura odatda qanday tur hisoblanadi? =reference type =value type =static type =pointer type 3. strukturada default konstruktoriga ruxsat bormi? =ha, xohlagancha =yo‘q, struct o‘zining default konstruktorini avtomatik oladi =faqat private bo‘lsa bo‘ladi =faqat public bo‘lsa bo‘ladi 4. strukturada parametrsiz konstruktor yozish mumkinmi? =ha, yoziladi =yo‘q, struct o‘zining parametrsiz konstruktoriga ega va uni yozib bo‘lmaydi =faqat protected bo‘lsa yoziladi =agar static …
5 / 6
obyektlarini nusxalashda qanday mexanizm ishlaydi? =copy by value =copy by reference =shallow copy =deep copy 12. strukturalar xotira boshqaruvchisi (garbage collector) tomonidan boshqariladimi? =ha =yo‘q, ular stack da saqlanadi =faqat static struct lar boshqariladi =faqat sealed struct lar boshqariladi 13. strukturalarni null qilib bo‘ladimi? =ha, oddiy struct lar null bo‘ladi =yo‘q, faqat nullable bo‘lsa null bo‘ladi =struct lar default qiymatida null bo‘ladi =faqat reference type bo‘lsa null bo‘ladi 14. strukturada static maydonlar bo‘lishi mumkinmi? =ha =yo‘q =faqat static struct bo‘lsa =faqat readonly static bo‘lsa 15. strukturada default qiymati nima bo‘ladi? =null =barcha maydonlari 0 yoki null qiymat oladi =hech qanday qiymatga ega bo‘lmaydi =struct ga to‘liq qiymat berish shart 16. strukturani faqat o’qish rejimida qilib e’lon qilish mumkinmi? =ha, readonly struct orqali =yo‘q, faqat class uchun =faqat property lar readonly bo‘ladi =faqat static struct bo‘lsa 17. strukturalar qaysi xotirada saqlanadi? =heap =stack =garbage collector =database 18. quyidagi strukturani to‘g‘ri ishlatish …

Want to read more?

Download all 6 pages for free via Telegram.

Download full file

About "c# tilida kortej yaratish"

1. c# tilida kortej qanday e’lon qilinadi? =tuple mytuple = new tuple(); =var tuple = new tuple (); =var tuple = (1, "hello"); =var tuple = new[] { 1, "hello" }; 2. c# kortej elementiga qanday murojaat qilinadi? =tuple.element1 =tuple.item1 =tuple[0] =tuple->item1 3. quyidagilardan qaysi biri c# da kortej yaratishning to‘g‘ri usuli? =var person = ("john", 25); =tuple person = ("john", 25); =var person = new[] { "john", 25 }; =var person = tuple("john", 25); 4. kortej elementlarini nomlash qanday amalga oshiriladi? =var tuple = (string name = "john", int age = 25); =var tuple = (name: "john", age: 25); =var tuple = ("john": name, 25: age); =var tuple = tuple(name: "john", age: 25); 5. kortej elementlariga nom orqali qanday …

This file contains 6 pages in DOCX format (29.7 KB). To download "c# tilida kortej yaratish", click the Telegram button on the left.

Tags: c# tilida kortej yaratish DOCX 6 pages Free download Telegram