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 entityset? : Entity framework
What is difference between html.beginform and ajax.beginform?
Give an example for authorization filters in an asp.net mvc application?
Can you explain the page life cycle of mvc?
What is managed extensibility framework?
Which filter executes first in an asp.net mvc application?
What is Separation of Concerns in ASP.NET ASP.Net MVC?
Can we change web.config settings from iis?
What is associationset? : Entity framework
What is the difference between .net core and .net framework?
Can we add constraints to the route? If yes, explain how we can do it?
what is client wins and store wins mode in entity framework concurrency?
What is representational state transfer (rest) mean?
What is Differnce between html.action and ajax.action?
what is dot net? what is use dot net? what is benifit of dot net?what is vb dot net? what is ado dot net? what is c#?