what are the differences b/w structure and class?

Answer Posted / ctharam

Struct:-
-------
1) by default, Public
2) doesn't support OOP's Concepts.
3) doesn't support Constructor and Destructor member functions.
4) No Security for data.

Class:-
-------
1) by default ,Private
2) its support OOP's Concepts.
3) supports Constructor and Destructor .
4) provides highly security for user's data.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by default constructor?

840


What is the advantage of constructor in c#?

713


Can you explain template pattern?

772


What is mvc in c#?

677


write a c# program add two matrix with input number ?

767


Which constructor is called first in c#?

716


Why do we need encapsulation in c#?

743


What is the difference between a method and a property?

703


Why to use lock statement in c#?

711


List the differences between method overriding and method overloading?

717


What is the purpose of ienumerable in c#?

710


How do I get deterministic finalization in c#?

831


list the steps in code compilation in c#?

680


What is private in c#?

696


What is array class in c#?

655