What is the difference between ref & out parameters?

Answers were Sorted based on User's Feedback



What is the difference between ref & out parameters?..

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

What is the difference between ref & out parameters?..

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

Post New Answer

More C Sharp Interview Questions

What is the difference between first and firstordefault?

0 Answers  


Difference between value and reference type.

0 Answers  


What is disco?

0 Answers  


What is the difference between finalize() and dispose() methods?

0 Answers  


Do unused Namespaces in c# affect run-time performance?

0 Answers   HCL,






What is the difference between method and function in c#?

0 Answers  


what is unit testing

2 Answers  


Define multicast c# delegate?

0 Answers  


How can an inner class access the members of outer class?

0 Answers   Changepond,


What is instantiating a class?

0 Answers  


What does mean c#?

0 Answers  


Wats the diff between sealed class and private class in inheritance

7 Answers   iSoft,


Categories