.NET Fiddle

CSharp · Console

/Program.cs

using System;
					
public class Program
{
	public static void Main()
	{
		int i = 30;
		object j = 1;
		AlterSObject(ref j);
		Console.WriteLine("i = {0}, j = {1}", i, j);
	}
	static void AlterSObject(ref object testO)
	{
		int b = 130;
		testO = b;
	}
}
;