Javatpoint Logo
Javatpoint Logo

C# String IsInterned()

The C# IsInterned() method is used to get reference of the specified string.

The difference between Intern() and IsInterned() is that Intern() method interns the string if it is not interned but IsInterned() doesn't do so. In such case, IsInterned() method returns null.

Signature

Parameter

str: it is a string type parameter.

Return

It returns a reference.


C# String IsInterned() Method Example

Output:

Hello C#
Hello C#
Hello C#

C# String Intern() vs IsInterned() Example

Output:

True
False





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA