ClassBuilderClassFromString Method (String, String, NetLanguage, ListAssembly) |
Compiles the source code passed and returns the Type with the name className.
Namespace:
FileHelpers.Dynamic
Assembly:
FileHelpers (in FileHelpers.dll) Version: 3.2.6
Syntaxpublic static Type ClassFromString(
string classStr,
string className,
NetLanguage lang,
List<Assembly> additionalReferences = null
)
Public Shared Function ClassFromString (
classStr As String,
className As String,
lang As NetLanguage,
Optional additionalReferences As List(Of Assembly) = Nothing
) As Type
Parameters
- classStr
- Type: SystemString
The Source Code of the class in the specified language - className
- Type: SystemString
The Name of the Type that must be returned - lang
- Type: FileHelpersNetLanguage
One of the .NET Languages - additionalReferences (Optional)
- Type: System.Collections.GenericListAssembly
List of assemblies to be added in the dynamic compilation
Return Value
Type:
TypeThe Type generated by runtime compilation of the class source.
See Also