StronglyTypedResourceBuilder::Create Method (IDictionary^, String^, String^, CodeDomProvider^, Boolean, array<String^>^%)


Generates a class file that contains strongly typed properties that match the resources referenced in the specified collection.

Namespace:   System.Resources.Tools
Assembly:  System.Design (in System.Design.dll)

static CodeCompileUnit^ Create(
	IDictionary^ resourceList,
	String^ baseName,
	String^ generatedCodeNamespace,
	CodeDomProvider^ codeProvider,
	bool internalClass,
	[OutAttribute] array<String^>^% unmatchable


Type: System.Collections::IDictionary^

An IDictionary collection where each dictionary entry key/value pair is the name of a resource and the value of the resource.

Type: System::String^

The name of the class to be generated.

Type: System::String^

The namespace of the class to be generated.

Type: System.CodeDom.Compiler::CodeDomProvider^

A CodeDomProvider class that provides the language in which the class will be generated.

Type: System::Boolean

true to generate an internal class; false to generate a public class.

Type: array<System::String^>^%

An array that contains each resource name for which a property cannot be generated. Typically, a property cannot be generated because the resource name is not a valid identifier.

Return Value

Type: System.CodeDom::CodeCompileUnit^

A CodeCompileUnit container.

Exception Condition

resourceList, basename, or codeProvider is null.


A resource node name does not match its key in resourceList.

Use the Create method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the resourceList parameter.

The StronglyTypedResourceBuilder class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers.

.NET Framework
Available since 2.0
Return to top