What is the difference between structures and enumeration ?



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

Post New Answer

More Dot Net Framework Interview Questions

what is an assembly?

11 Answers  


What are the advantages of mvc over asp.net?

0 Answers  


What are the derived classes from xmlReader and xmlWriter

1 Answers  


what is Assemble

4 Answers   Microsoft,


What is .net framwork? what is web application? what is CLR? How does work CLR & wht is work of CLR? What is compile? wht is thread? what does use in .net?

4 Answers   IBM, NIIT,






What is the difference between model view and controller?

0 Answers  


can i change web.config settings from iis?

1 Answers   HCL, ReadySoft, Wipro,


What is gacutil.exe. Where do we store assemblies ?

5 Answers   Accenture, BirlaSoft,


what is mean by versioning? Please answer me. Advance thanks.

2 Answers   Excel,


About DTS package ?

1 Answers   Accenture, Grafotech,


what do you mean by table-per-type?

0 Answers   Microsoft,


I can't be bothered with all this CAS stuff. Can I turn it off

1 Answers  


Categories