What is the difference between ref & out parameters?
Answers were Sorted based on User's Feedback
Answer / padam
An argument passed as ref must be initialized before passing
to the method whereas out parameter needs not to be
initialized before passing to a method.
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / satya
ref keyword is used while passing the parameters by reference.
out keyword is used while passing the parameters by out
Is This Answer Correct ? | 0 Yes | 1 No |
what are nullable types in c#
Can you declare struct members as protected?
How do I create multifile assembly?
Consider the following pieces of C# code: a. interface I1 {/*......*/} interface I2 {/*......*/} struct Point : I1,I2 {/* ..... */} b. struct Book{ int bookId; struct Book b; } c. using M=Mystruct; struct MyStruct{ int id; } class MyClass{ static void Main(string[] args){ M m = new M(); } } d. struct Sample{ Sample ref x; } Which of the above are correct? Choose one of the options below. a, c and d are right a only right a and c are right d only wrong None of the listed options
What is integer c#?
Types of Unboxing?
What is the C# syntax to catch any possible exception?
Is null == null c#?
Explain the three test cases in unit testing?
if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.
Can main method be final?
What is difference between dictionary and hashtable?