PC Review


Reply
Thread Tools Rate Thread

Creating value types from a Type instance

 
 
Andrew Jarvis
Guest
Posts: n/a
 
      2nd Oct 2009
I can create an arbitrary class from its Type instance calling the Invoke
method of a ConstructorInfo returned by its GetConstructor method.

How do I create a value type class that does not have a constructor?


 
Reply With Quote
 
 
 
 
Andrew Jarvis
Guest
Posts: n/a
 
      2nd Oct 2009
No need to reply - I just discovered Activator::CreateInstance!

"Andrew Jarvis" <someone@somewhere> wrote in message
news:%(E-Mail Removed)...
>I can create an arbitrary class from its Type instance calling the Invoke
>method of a ConstructorInfo returned by its GetConstructor method.
>
> How do I create a value type class that does not have a constructor?
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception creating type instance Richard Bell Microsoft Dot NET Framework 0 10th Sep 2004 12:33 PM
Exception creating type instance Richard Bell Microsoft C# .NET 0 10th Sep 2004 12:33 PM
Creating an instance from a System.Type object Simon Jefferies Microsoft VB .NET 1 8th Jul 2004 04:32 PM
Creating instance of type withoguht reference to assembly =?Utf-8?B?U3Bpa2U=?= Microsoft C# .NET 4 13th Apr 2004 08:06 AM
creating a new instance of an object XXX type jernej goricki Microsoft VB .NET 20 21st Dec 2003 12:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:50 PM.