Reflection: Creating an array of a type?

A

Axel Dahmen

Hi,

I'd like to create an array of a Type. How can I do that using reflection?

Currently I'm using the following code to create single instances:

constr=type.GetConstructor(new Type[]{...});
newObj=constr.Invoke(new object[]{...});

Now I need to create a typed array of that type to store a number of these
instances. How can I do that?

Any help is quite appreciated!

TIA,
Axel Dahmen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top