[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Is the any difference between these two ?

zhaoyao

11/4/2002 3:36:00 AM

Hi All,

Is there any difference between these 2....

a) Using an instance descriptor.
myType newObject = (myType)TypeDescriptor.GetConverter(
typeof(myType) ).ConvertTo( new myType(), typeof(InstanceDescriptor) );

b) Using the ConstructorInfo.Invoke...
ConstructorInfo ctor = typeof(myType).GetConstructor( new Type[] {} );
myType newObject = (myType)ctor.Invoke( new object[] );

Thanks,

moses






1 Answer

(Mike Clay (MSFT))

11/7/2002 4:57:00 PM

0

Hi Moses,

I've tried doing a little research on this. Nobody seems to think there is
a difference.
I'll keep looking. If I find out different I'll post it.

Mike Clay, MCSD
Beta Technical Support


This posting is provided "AS IS" with no warranties, and confers no rights.
© 2002 Microsoft Corporation. All rights reserved.