what are the differences b/w structure and class?
Answer Posted / srikanth chodavarapu
Following are the key differences between them :-
1. Structure are value types and classes are reference
types.So structures use
stack and classes use heap.
2. class can have constructor, but structure cant have
constructor.
3. class can have garbage collector, but structure cant
have garbage collector.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is the namespcae generally given to the webpage of the .NET Framework ?
List some of the common data providers for ado.net framework?
Are value types sealed?
What is an expression in c#?
What are data types with examples?
Is c# substring zero based?
What is the difference between a function and a method?
What is the resgen.exe tool used for?
What is inner class in c#?
Why are dynamic link library used over static one?
What do u mean by thread safe?
How do I open the console window?
Explain About a class access specifiers and method access specifiers.
What is lazy loading and eager loading in c#?
What is difference between virtual and override in c#?