System.Reflection.Emit.ModuleBuilder.GetStringConstant Method

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

Syntax

public StringToken GetStringConstant (string str)

Parameters

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

Returns

The token of the string in the constant pool.

Remarks

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

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0