Hi Wilson,
To generate the class, you will need to compile the code using something like CodeDom. Rick Strahl has an article explaining how to do this. Here is a link:
http://west-wind.com/presentations/dynamicCode/DynamicCode.htm>The C# code is fine.
>
>But this will create an instance from a class already defined.
>
>What i would like to do is this or something like this:
>
>str = "Class MyClass " & vbCrLf & _
> "Public Property ID" & vbCrLf & _
> "Code..." & vbCrLf & _
> "End Property" & vbCrLf & _
> "End class"
>
>and be able to create an instance based on the class defined in this string.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi