What is the use of "default" and "Using" keyword?
Answers were Sorted based on User's Feedback
Answer / pavan kumar
"default" is a keyword which can be used in two ways
1)In switch as default label
2)In generics as default paramenter.
same as "using" key word this also used in two ways
1)For implementing the namespace into current class
2)Used to check properly dispose of object using the
IDisposable interface
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / ravi
"default" ensures the correct initialisation takes place
and "Using" ensures the disposal of object.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / kamil
If expression does not match any constant-expression, control is transferred to
the statement(s) that follow the optional default label. If there is no default
label, control is transferred outside the switch.
| Is This Answer Correct ? | 3 Yes | 3 No |
Code to run exe like mspaint,autocad etc in asp.net.
What is a service layer c#?
What is application object in c#?
directcast(123.34,integer) - should it throw an error? Why or why not?
Is c# good for games?
Explain types of comment in c# with examples
What is the difference between as and is operators in c#?
What is mvc firstordefault?
Why do I get a "cs5001: does not have an entry point defined" error when compiling?
What?s a delegate?
How do you concatenate in c#?
Can you prevent your class from being inherited and becoming a base class for some other classes?
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)