DEV Community

asilbek ibragimov
asilbek ibragimov

Posted on • Edited on

2 1 2 2 1

4.Value Type and Reference Type

4.Value Type and Reference Type
Test savollari:
a)Value type va reference type nima?

b)Quyidagi kodni tushuntiring

 int a = 5;
 int b = a;
 b = 10;
 Console.WriteLine(a); 
Enter fullscreen mode Exit fullscreen mode

Test javoblari:
a) Value Type — qiymatning o'zi bilan ishlaydigan tip
ular stack xotirasida saqlanadi.

    b) Reference Type - qiymatni o'zi bilan emas balki 
       qiymatni saqlagan joyga ishora bilan ishlidi va heapda 
       saqlanadi.


    c) a = 5 teng, b a ga teng va b ning qiymati 10 ga 
       o'zgaradi. a ni elon qilganimiz uchun a qiymati 5 
       chiqadi;
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more