ModuleBuilder.GetStringConstant Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns the token of the given string in the module’s constant pool.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public StringToken GetStringConstant(
	string str
)

Parameters

str
Type: System.String

The string to add to the module's constant pool.

Return Value

Type: System.Reflection.Emit.StringToken

The token of the string in the constant pool.

Exception Condition
ArgumentNullException

str is null.

If str has already been defined, the existing token will be returned.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: