While Lucas' suggestion on AppDomains would work, alternatively you could create this effect using generics, as a class with different generic type arguments is treated as a different class, and therefore has its own static fields.
public class SomeClass<T>
{
public static string SomeField;
}
Then:
SomeClass<int>.SomeField = "A";
SomeClass<string>.SomeField = "B";
Console.WriteLine(SomeClass<int>.SomeField); // A
Console.WriteLine(SomeClass<string>.SomeField); // B
For example, the SomeClass<int>
would be set in the library, whereas the SomeClass<string>
would be your copy. Of course this would only work if you could change the library, or the library already used generics.