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
Are c# strings null terminated?
Why do I get a syntax error when trying to declare a variable called checked?
Why do we use anonymous method in c#?
Explain attributes in c#?
Structs are largely redundant in c++. Why does c# have them?
Does main have to be static c#?
What is event and delegates in c#?
Are enums static c#?
What is the difference between method and function in c#?
What are custom attributes in c#?
What is inner class in c#?
Is array thread safe c#?
What is a multi line comment?
What is func c#?
What is inheritance c#?