Come on let’s talk .. ..

I was reading a book last night and noticed plenty of codes in that book were using ‘ref’ in the methods. Mmm.. plenty in the sense almost all of them except where the example methods have some value type parameters. Here’s a simple example, (a screen shot of the page) Then I thought we all … Continue reading Come on let’s talk .. ..

ref & out in C#

This post explains about the ‘ref’ and ‘out’ keywords in C#. In C# we have two types; 1) value types 2) reference types. Value types variables are passed as copies to the methods and any changes inside a method does not affect the variable. ‘ref’ keyword is used to pass a value type as a … Continue reading ref & out in C#