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

How do you escape in c#?

494


How many types of methods are there in c#?

518


What is argument in c#?

516


what are pointer types in c#

548


Why do we need properties in c#?

490






What is tryparse?

513


Explain “static” keyword in c#?

474


What are the types of methods in c#?

455


What is iformatprovider in c#?

490


What is Garbage Collection in .Net?

601


Describe an interface class?

560


What is visual c# net?

486


If you donot specify an access modifier for a method, what is the default access modifier?

538


What language do desktop applications use?

473


What is the difference between gettype and typeof in c#?

451