Thursday, April 19, 2007

مالفرق بين value type and reference type ?

in C#. Data
types are either value types or reference types.

1- A variable of a value type contains data of that type.
2-A variable of a reference type, in contrast, contains the address of the location in
memory where the data are stored.


Value types normally represent single pieces of data, such as int or bool values.

Reference types, on the other hand, refer to objects, which can contain many individual pieces of data.

0 Comments:

Post a Comment

<< Home