Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the purpose of ienumerable in c#?

1007


What do you use c# for?

913


Can struct inherit from class c#?

994


Give an example of removing an element from the queue?

937


What is session c#?

966


Is there throws keyword in c#?

908


What is the meaning of int parse in c#?

944


Is datetime a value type in c#?

886


Which is executed if an exception has not occurred?

952


What is lazy loading and eager loading in c#?

916


What are the types of delegates in c#?

900


What is an icollection in c#?

890


Define strong name in c#?

922


What is integer c#?

907


How do you prevent a class from being inherited?

921