Runtime: Activator.CreateInstance<T> with params?

Created on 25 Dec 2018  路  6Comments  路  Source: dotnet/runtime

Can we have another overload of the generic Activator.CreateInstance<T> such that accepts a params object[] args like the non-generic one?

api-suggestion area-System.Reflection enhancement

Most helpful comment

@MarcoRossignoli I know I honestly didn't know what else to write since this suggestion is so short and self-descriptive.
And in that note @ichensky, PRs should be submitted upon API review and approval.

All 6 comments

Usually every new public api should follow review process outlined here https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/api-review-process.md

@MarcoRossignoli I know I honestly didn't know what else to write since this suggestion is so short and self-descriptive.
And in that note @ichensky, PRs should be submitted upon API review and approval.

And in that note @ichensky, PRs should be submitted upon API review and approval.

I meant that :)

Can you describe the scenario a bit further? What's the benefit of having this API over calling (T)Activator.CreateInstance(typeof(T), ...)?

Closing this out as there has been no response and the scenario for adding this over using the existing API is not clear. Please reopen if the scenario can be clarified.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omajid picture omajid  路  3Comments

EgorBo picture EgorBo  路  3Comments

bencz picture bencz  路  3Comments

Timovzl picture Timovzl  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments