Well, I tried and here is the result. Not so good I'm afraid.
using System;
public class SomeClass
{
public static void swap (ref object x, ref object y)
{
object temp;
temp = x;
x = y;
y = x;
}
public static void main()
{
int a = 5, b = 10;
string c = "Hello ", d = "World!";
TheClass e = new TheClass(5), f = new TheClass(10);
Console.WriteLine("int a = {0}, b = {1}", a, b);
Console.WriteLine("string c = {0}, d = {1}", c, d);
Console.WriteLine("TheClass e = {0}, f = {1}", e, f);
swap (ref a, ref b);
swap (ref c, ref d);
swap (ref e, ref f);
Console.WriteLine("After swap of a and b, c and d, e and f"

;
Console.WriteLine("int a = {0}, b = {1}", a, b);
Console.WriteLine("string c = {0}, d = {1}", c, d);
Console.WriteLine("TheClass e = {0}, f = {1}", e, f);
}
}
public class TheClass
{
public int x;
public TheClass(int y)
{
x = y;
}
}
C:\Arbetskatalog>csc hello.cs
Microsoft (R) Visual C# .NET Compiler version 7.00.9466
for Microsoft (R) .NET Framework version 1.0.3705
Copyright (C) Microsoft Corporation 2001. All rights reserved.
hello.cs(23,3): error CS1502: The best overloaded method match for
'SomeClass.swap(ref object, ref object)' has some invalid arguments
hello.cs(23,13): error CS1503: Argument '1': cannot convert from 'ref int' to
'ref object'
hello.cs(23,20): error CS1503: Argument '2': cannot convert from 'ref int' to
'ref object'
hello.cs(24,3): error CS1502: The best overloaded method match for
'SomeClass.swap(ref object, ref object)' has some invalid arguments
hello.cs(24,13): error CS1503: Argument '1': cannot convert from 'ref string' to
'ref object'
hello.cs(24,20): error CS1503: Argument '2': cannot convert from 'ref string' to
'ref object'
hello.cs(25,3): error CS1502: The best overloaded method match for
'SomeClass.swap(ref object, ref object)' has some invalid arguments
hello.cs(25,13): error CS1503: Argument '1': cannot convert from 'ref TheClass'
to 'ref object'
hello.cs(25,20): error CS1503: Argument '2': cannot convert from 'ref TheClass'
to 'ref object'
C:\Arbetskatalog>