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 |
What is the relationship between a process, application domain, and application?
Can a loop recorder detect a heart attack?
What is string class in c#?
What is short in c#?
What is the difference between CONST and READONLY?
What is a hash table c#?
Is nullable type c#?
Can we assign null value to integer?
Who introduced c#?
what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?
what is a static constructor?
How to transpose multi-dimensional array?