Click or drag to resize

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
Syntax
public static Type ClassFromString(
	string classStr,
	string className,
	NetLanguage lang,
	List<Assembly> additionalReferences = null
)

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: Type
The Type generated by runtime compilation of the class source.
See Also