Hi! It's me again. And my another problem with generic methods (
I have two assemblies A and B, B makes reference to A.
Assembly A contains abstract class Class1
public abstract class Class1
{
public abstract IList GetObjects();
public abstract List<int> GetObjects(Type objectType);
public abstract List<T> GetObjects<T>();
}
Assembly B contains class Class2, which implements Class1 and also has its own method
public class Class2: Class1
{
public override IList GetObjects()
{
return new ArrayList();
}
public override List<int> GetObjects(Type objectType)
{
return new List<int>();
}
public override List<T> GetObjects<T>()
{
return new List<T>();
}
public void GetObjects(out IList list)
{
list = new ArrayList();
}
}
In obfuscation options for assembly B I set Naming=Alphabetical, but for A Naming=AlphaNumeric.
Obfuscated code looks like following:
for Class1
public abstract class GZmyQ
{
protected GZmyQ();
public abstract List<T> 1vcGtMZ<T>();
public abstract IList 1vcGtMZ();
public abstract List<int> 1vcGtMZ(Type);
}
for Class2
public class yLZtP : GZmyQ
{
public yLZtP();
public override IList 1vcGtMZ(); //ok
public override List<int> 1vcGtMZ(Type); //ok
public override List<T> clwnpLZ<T>(); // ?
public void clwnpLZ(out IList); //ok
}
So, if we'll try to create instance of Class2, we'll get TypeLoadException...
What I have to do, except setting Naming=Alphabetical for both assemblies?