i've a strange issue with AppDomain.DoCallBack() and generic types:
static void InvokeIsolated() {
AppDomain appDomain = AppDomain.CreateDomain("testDomain");
appDomain.DoCallBack(MyDoCallBack<string, string>); //<-- ArgumentNullException!
}
static void MyDoCallBack<T, T1>() {}
i get an argumentnullexpcetion with the message: "value cannot be null" when the generic types are the same.
if i change the docallback to this:
appDomain.DoCallBack(MyDoCallBack<string, int>); //<-- OK!
that means if the generic types are different, there is no problem.
what is wrong or is this a .net bug??