NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ModuleBuilder.GetStringConstant

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

[Visual Basic]
Public Function GetStringConstant( _
   ByVal str As String _
) As StringToken
[C#]
public StringToken GetStringConstant(
   string str
);
[C++]
public: StringToken GetStringConstant(
   String* str
);
[JScript]
public function GetStringConstant(
   str : String
) : StringToken;

Parameters

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

Return Value

Returns the StringToken of the string added to the constant pool.

Exceptions

Exception Type Condition
ArgumentNullException if str is a null reference (in Visual Basic Nothing)

Remarks

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

See Also

ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace