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
How do I count the length of a string in c#?
Is c# difficult to learn?
Define multicast delegate? How it be used?
Explain how is the dll hell problem solved in .net?
What does char mean in c#?
What is anonymous methods in c#?
What are strong name assemblies?
Why we use get set in c#?
What is a thread? What is multithreading?
What is int parse in c#?
Is int a struct in c#?
What is 8 bit signed integer?
Do void methods have parameters?
What is the difference between namespace and class in c#?
What is a reference type c#?