1

Closed

Reflection: Suggest Change for ClassUtils.CreateNewInstance - Add params keyword

description

I can recommend the following change:
From:
   public static Object CreateNewInstance(Type type, object[] paramss)
To:
   public static Object CreateNewInstance(Type type, params object[] paramss)
 
Reason: much easier to list parameters without the necessity to wrap them into a clumsy statement new object[] {...}. Plus, no additional code changes or very minor are usually required - existing code should compile and execute with no problems.
 
Raised by mcbit
Closed May 31, 2007 at 1:36 AM by JoeBlack

comments

wrote May 31, 2007 at 1:36 AM

Resolved with changeset 2884.

wrote Feb 14, 2013 at 1:21 AM

wrote May 16, 2013 at 6:59 AM