C# da xotiraga 2 xil usulda saqlanadi Reference type alohida va value typelar alohida saqlanadi
*Reference type *
string
Arrays
class
interface
delegate
Value type
bool
byte
char
decimal
double
enum
float
int
long
sbyte
short
struct
uint
ulong
ushort
Farqi
Reference type lar heap xotiraga value type lar stack xotiradan joy egallaydi. Reference type lar ishlashi pointerga o'xshaydi. Masalan
string a , b ; a = hello ;
b = a;
bunda a ga heap xotiradan joy ajratadi b ni a ga o'zlashtirganimizda a ga alohida joy ajratmasdan xuddi pointer kabi murojat qiladi.Value type larda esa aksincha bo'ladi
Top comments (0)