Link to home
Start Free TrialLog in
Avatar of Rahamathulla_J
Rahamathulla_J

asked on

getinstance in c#

Hi,

I have convert the below java code into C# like the code given below i want to know whether it is ok or i have to do some other think?.


//Java code
Class c = Class.forName(module);
Object configObj = c.newInstance();


//C# code
System.Type c = System.Type.GetType(module);
System.Object configObj = System.Activator.CreateInstance(c);
Avatar of devsolns
devsolns

yeah, that is it.
ASKER CERTIFIED SOLUTION
Avatar of BBK_
BBK_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yeah there are a lot of things like that you can point out but I dont see it being handled in java impl.