What is the difference between structures and enumeration ?
Answer Posted / 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 |
Post New Answer View All Answers
What is Differnce between html.action and ajax.action?
What is poco proxy? : Entity framework
How does the .net framework 3.0 relate to windows vista?
Can any particular component of .net framework 3.0 be removed?
What is ViewData and TempData in ASP.Net MVC?
What are the possible razor view extensions?
What are the components of the .net framework.
What is orm entity framework?
Explain the methods used to render the views in mvc?
What is the use of web api ? Why web api needed, if you have already restful services using wcf ?
what is msl?
What you mean by routing in asp.net mvc?
mention what is the key advantage of using entity framework or ef?
What is action methods in web api?
Explain the tools used for unit testing in ASP.Net MVC