Explain About ref and out parameters?

 Posted by BangaruBabu on 7/26/2010 | Category: C# Interview questions | Views: 4370
Answer:

ref parameter:
Ref is keyword.
it must be used along with actual and formal arguments.
ref variables must be initialized before passing to a function

out parameter:
It is very similar to call by Reference.
Out is a Keyword.
Which must be used along with actual and formal arguments.
Out variables are not require to initialize, the initialized value will not be passed, only reference will be passed.


Asked In: Asked in HCl telephonic Interview | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by BangaruBabu