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

Differentiate between static class and singleton instance?

0 Answers  


What is generic delegate in c#?

0 Answers  


What is asp net c# corner?

0 Answers  


What?s an interface class?

5 Answers   Mind Tree,


What is a linked list c#?

0 Answers  






Is comparator a functional interface?

0 Answers  


Can int be null c#?

0 Answers  


Is array value type in c#?

0 Answers  


What are the string functions in c#?

0 Answers  


What are the 3 elements of delegation?

0 Answers  


Explain the difference between object type and dynamic type variables in c#?

0 Answers  


What is an abstract class c#?

0 Answers  


Categories