Ref keyword in C#

Sourav.Kayal
Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 763
using System;
using System.Linq;
using System.Text;
using System.Collections;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
namespace BlogProject
{
class RefTest
{
public void TakeRef(ref RefTest obj) //Take reference of object
{

}
}
class Program
{
static void Main(string[] args)
{
RefTest t = new RefTest();
t.TakeRef(ref t);
Console.ReadLine();
}
}
}

Comments or Responses

Login to post response