What is the difference between structures and enumeration ?
Answer / kirti
Unlike classes, structs are value types and do not require heap allocation. A variable of a struct type directly contains the data of the struct, whereas a variable of a class type contains a reference to the data. They are derived from System.ValueType class.
Enum->An enum type is a distinct type that declares a set of named constants.They are strongly typed constants. They are unique types that allow to declare symbolic names to integral values. Enums are value types, which means they contain their own value, can't inherit or be inherited from and assignment copies the value of one enum to another.
public enum Grade
{
A,
B,
C
}
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of finalize and dispose eventhough garbage collector is working?
Which is the best institute for .net?
What is tempdata?
Can u tell me differences which are introduced in .Net 1.1 and 2.0 and 3.0 and also in 3.5 ? by detailed?
How to bind table coloum with gridview column
3 Answers Sypher Technologies,
What is the difference between ViewData, ViewBag and TempData?
What is entity framework in asp net?
How to set the debug mode
Why do you need to box a primitive variable
What's the difference between const and readonly ?
what is way of loading data in ef (entity framework)?
How do you handle variable number of segments in a route definition?