What is the difference between ref & out parameters?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens when thread sleep () method is called?

576


What is the difference between package and interface?

570


When should we use sealed class in c#?

567


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

626


What is the use of delegates in c#?

550






Why do we use interfaces in c#?

585


Does google use c#?

606


Why delegates are type safe in c#?

596


How do destructors and garbage collection work in c#?

603


What do you mean by the delegate in c#?

598


Why data types are important?

600


What is returned if you pass the value 12.34 to the parsefloat () function?

607


When is a class declared as a class abstract?

655


Please explain value types and reference types used in c#?

566


What is the difference between list and arraylist c#?

607