what are the differences b/w structure and class?

Answer Posted / purushotham .tella

Structures are Value-Types. This means, the data that they
contain is stored as a stack on the memory. Classes are
Reference-Types, means they are stored as a heap on the memory.

Structures are implicitly derived from a class called
System.ValueType.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a protected class in c#?

698


Define boxing and unboxing in c#?

666


List some of the classes used by system.data namespace?

619


What is wcf c#?

721


What is command object in c#?

720


So let's say I have an application that uses myapp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name myapp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new myapp.dll?

688


What are examples of desktop applications?

723


Explain attributes in c#?

639


What is scaffolding in c#?

701


Define delay signing?

715


I want to print "Hello" even before main() is executed. How will you achieve that?

715


How many variables do you need?

703


What happens if a static constructor throws an exception?

708


What is static noise?

692


Why do we need constructor in c#?

701