Intern Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Retrieves the system's reference to the specified String.

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

public static string Intern(
	string str
)

Parameters

str
Type: System..::..String
A string to search for in the intern pool.

Return Value

Type: System..::..String
The system's reference to str, if it is interned; otherwise, a new reference to a string with the value of str.

ExceptionCondition
ArgumentNullException

str is nullNothingnullptrunita null reference (Nothing in Visual Basic).

Show: