why sturcture ? why class?why you prefer structure and in
which cases u go for class?
Answer / supraja
Class
-->It is reference type
-->The values allocated in heap
-->Can have constructors, properties, methods
-->Abstract and sealed are possible
-->We cannot have parameter less constructor
-->We can overload constructors
-->Reference type
-->Supports data members, code members (methods) and events
-->Supports inheritance
-->Preferable when you need to initialize one or more
members upon creation
-->Can have parameterized constructors
-->More flexible, unlimited event handling support
Structure
-->It is value type
-->The values allocated in stack
-->Can have constructors, properties, methods
-->Abstract and sealed are not possible
-->By default public
-->We cannot have parameter less constructor
-->We can overload constructors
-->Value type
-->Supports data members, code members (methods) and events
-->Can not inherit
-->Preferable when you perform large number of operations
on each instance
-->Can not control initialization using structure variable
-->Less flexible, limited event handling support
| Is This Answer Correct ? | 4 Yes | 6 No |
What are PE(Portable Executable)?
What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?
What are the Types of JIT and what is econo-JIT
What is oledbconnection c#?
Is stringbuilder better than string?
Define Abstract Class in C#
What is the difference between int.Parse() and Convert.toInt32().
What is difference between singleton and static class in c#?
What are the methods in c#?
What are the 2 broad classifications of data types available in c#?
What is overriding in c#?
what is diffrence between protected ,internal and protected internal?? whether protected field available in derived class which is outside the assembly. if not ..this is possible by which access modifiers??
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)