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 are Model Binders in ASP.Net MVC?
Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Qu)I Got Exception in "try" block. Which "catch" statement (i.e. 1st catch or 2nd catch ) catches the exception and Why???
If I have multiple filters implemented, what is the order in which these filters get executed?
What is session state management?
How do you assign a value to a complex number 7 how has exception hand changed in .net framework 4.0?
What is the mvc pattern (model view controller pattern)?
What is the difference between using system.net and system.net.sockets?
What are HTML Helpers, AJAX Helpers in ASP.Net MVC?
What is GUID and why we need to use it and in what condition? How this is created
js fn to go to the particular page when enter is clicked
What platforms does the .NET Framework run on?
Is it possible to create a custom filter?