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

Explain namespaces in c#.

772


What is the difference between == and object.equals?

682


We cannot create instances of static classes. Can we have constructors for static classes?

731


What is array and types of array in c#?

681


What is routing in c#?

648


What is reflection c#?

649


What is the purpose of namespace in c#?

650


What does it mean to override a method?

667


What is difference between mutable and immutable in c#?

672


What is event and delegates in c#?

761


What happens when thread sleep () method is called?

681


How do you achieve polymorphism in c#?

669


Give an example to show for hiding base class methods?

637


What is the difference between var and dynamic types in c# 4.0?

708


What are data types with examples?

737