I'm trying to deserialize an array of an type unknown at compile time. At runtime I've discovered the type, but I don't know how to create an instance.
Something like:
Object o = Activator.CreateInstance(type);
which doesn't work because there is no parameterless constructor, Array doesn't seem to have any constructor.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…