out and ref keywords in c#
what is ref and out keyword in c#
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Feb 25, 2015, 11:21 PM
http://www.c-sharpcorner.com/UploadFile/ff2f08/ref-vs-out-keywords-in-C-Sharp/
hope this will help you.
Santhakumar MunuswamyPosted Feb 25, 2015, 2:23 PM
Could you please try msdn link
https://msdn.microsoft.com/en-us/library/14akc2c7.aspx
https://msdn.microsoft.com/en-us/library/t3c3bfhx.aspx
Pankaj Kumar ChoudharyPosted Feb 25, 2015, 12:32 PM
1. Ref variable must be assigned before it used but out does not require.
2. Our compiler never allocate a memory to Out variable before it is used but in case of Ref the memory is allocated to variable before use.
3. The out parameter 'value' must be assigned to before control leaves the current method but Ref variable does not put any such type restriction.
These are 3 main difference b/w Out and Ref Keyword ...........
Manish Kumar ChoudharyPosted Feb 25, 2015, 10:41 AM
RakeshPosted Feb 25, 2015, 10:41 AM
http://www.dotnetperls.com/parameter
Khargesh RajputPosted Feb 25, 2015, 10:35 AM