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 you mean by routing in mvc?
Is .net framework 4.8 the last version?
What is the advantage of using asp.net routing?
What is the difference between old ADO.NET and Entity framework coding techniques?
If I have multiple filters implemented, what is the order in which these filters get executed?
How does work clr?
What is net framework 3.0 ?
What are the two ways to add constraints to a route?
Will the name change be reflected in any of the existing .net framework 2.0 apis, assemblies, or namespaces?
will there be any issues adding a table without primary keys to a data model?
Is it possible to cancel filter execution?
Explain tempdata in asp.net mvc?
What are the Core features of ASP.NET MVC?
Why we need a separate mobile project template, while we can render our web application in mobile ?
mention what is the difference between ado.net and classic ado?