what are the differences b/w structure and class?
Answer Posted / sai laxman
class ex:-
class classname
{
int a;
float b;
}
struct {
int a;
int b;
}struct name;
In the struct all members are by default public,
in the class we can deference it private,public,protected.
While Inheriting from the structure all the members are
public by default but in class it depends upon the data
access modifiers.
| Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
What is the purpose of ienumerable in c#?
What do you use c# for?
Can struct inherit from class c#?
Give an example of removing an element from the queue?
What is session c#?
Is there throws keyword in c#?
What is the meaning of int parse in c#?
Is datetime a value type in c#?
Which is executed if an exception has not occurred?
What is lazy loading and eager loading in c#?
What are the types of delegates in c#?
What is an icollection in c#?
Define strong name in c#?
What is integer c#?
How do you prevent a class from being inherited?