public static void Main()
Console.WriteLine("Hello World");
var testInstance1 = new Test() { TestString = "asdf" };
TestCloning(testInstance1);
Console.WriteLine(testInstance1.TestString);
public static void TestCloning(Clone<Test> toClone) => TestCloningInternal(toClone);
private static void TestCloningInternal(Test uniqueTest)
uniqueTest.TestString = "xyz";
Console.WriteLine(uniqueTest.TestString);
public class Test : ICloneable
public string TestString { get; set; }
return new Test { TestString = this.TestString };
public class Clone<T> where T : ICloneable
public T Value {get;set;}
public static implicit operator T(Clone<T> source)
public static implicit operator Clone<T>(T source)
return new Clone<T>((T)source.Clone());