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 c sharp used for?
Can arraylist store different data types in c#?
What is string literal in c#?
What is function c#?
What is dll file in c#?
What is difference between comparable and comparator?
What kind of the information stored inside the assembly?
Is post back c#?
Explain how to add controls dynamically to the form using c#.net.
Why we use get and set method in c#?
Why abstraction is used in c#?
what is inheritance and an example in vb.net and c# of when you might use it?
How to prevent the error while updating ui control from another thread?
What is Inheritance in C#?
What is the use of inheritance in c#?