Please explain value types and reference types used in c#?
Answer / Raju Chaudhary
Value Types (also known as System.ValueType) are simple data types such as int, bool, and structs that store their values directly in the variable. When a value type is assigned to another variable, a copy of its value is created. Reference Types (also known as object) include classes, arrays, interfaces, delegates, and strings. They store a reference to the memory location where the actual data is stored. When a reference type is assigned to another variable, it copies the reference, not the actual data.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a console device?
Is array value type in c#?
How many destructors can a class have?
How do I declare a pure virtual function in c#?
Is lazy thread safe c#?
What is the correct way of declaring an xml namespace?
Is c# and c sharp same?
What is the default value of guid in c#?
What is an ienumerable in c#?
what is used ref keyword in c#,and how we used it?
What is event delegate in c#?
What is the concept of strong names?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)