ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories >> Software >> Microsoft-Related >> C-Sharp
 
 
 
Question
what is reference parameter?
what is out parameters?
what is difference these two?
 Question Submitted By :: Somavenki
I also faced this Question!!     Rank Answer Posted By  
 
Answer
When we pass a parameter as ref to a method, the method 
refers to the same variable and changes made will affect 
the actual variable. even the variable passed as out 
parameter is same as ref parameter, but implementation in 
c# is different, 
Arguement passed as ref parameter must be initialized 
before it is passed to the method. But in case of out 
parameter it is not necessary. But after a call to a method 
as out parameter it is necessary to initialize.
When to use out and ref parameter, out parameter is used 
when we want to return more than one value from a method.
 
2
Lakshmi
 
View All Answers
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com