StronglyTypedResourceBuilder.Create Method (IDictionary, String, String, CodeDomProvider, Boolean, String[])

Note: This method is new in the .NET Framework version 2.0.

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

public static CodeCompileUnit Create (
	IDictionary resourceList,
	string baseName,
	string generatedCodeNamespace,
	CodeDomProvider codeProvider,
	bool internalClass,
	out string[] unmatchable
public static CodeCompileUnit Create (
	IDictionary resourceList, 
	String baseName, 
	String generatedCodeNamespace, 
	CodeDomProvider codeProvider, 
	boolean internalClass, 
	/** @attribute OutAttribute() */ /** @ref */ String[] unmatchable
JScript does not support passing value-type arguments by reference.



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


The name of the class to be generated.


The namespace of the class to be generated.


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


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


A String 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

A CodeCompileUnit container.

Exception typeCondition


resourceList, basename, or codeProvider is a null reference (Nothing in Visual Basic).

Use the Create method to generate a class that provides strongly-typed, read-only access to 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.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0