what are the differences b/w structure and class?

Answer Posted / abhay k pandey

Structs many have constructors but they should not be
parameterless. Structs performs alomost all the tasks of a
class but differs at some points - structs don't support
inheritance hence there is no protected keyword with
structs. Note : still struct inherit from System.Object

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of constructor?

627


What are extensions methods in c#?

654


The int maps to which C# keyword in .NET type?

849


What is stringreader in c#?

665


Distinguish between a class and struct?

711


What is the diff between the System.Array.CopyTo() and System.Array.Clone()?

784


What do you know about WM_CHAR message?

762


Name the connections does microsoft sql server support?

691


Is c sharp and c# are same?

718


What is the difference between abstract class and interface in c#?

725


What is a console?

705


Can a class have static constructor?

755


What is the use of console application in c#?

696


Why do we need indexer in c#?

773


Are structs value types or reference types?

770