I have ApiContext object (do not have the code) and would like to make extention method for it
what is wrong with the code? it says:
cannot use this in static member
ApiContext
resides in the Singleton Pattern
public sealed class EbayProxySdk
{
private static EbayProxySdk _instance = null;
private static readonly Object LockObj = new object();
public ApiContext Context;
.
.
.
}
public static class MyExtensions
{
public static ApiContext DeepClone(this ApiContext context)
{
ApiContext other = (ApiContext)this.MemberwiseClone();
return other;
}
}
EDIT what I am eventually trying to do is Deep Clone to ApiContext
which is a complex object with nested objects