Javatpoint Logo
Javatpoint Logo

C# String Equals()

The C# Equals() method is used to check whether two specified String objects have the same value or not. If both strings have same value, it return true otherwise false.

In other words, it is used to compare two strings on the basis of content.

Signature

Parameter

str: it is a string object.

Return

It returns boolean value either true or false.


C# String Equals() Method Example

Output:

True
False 
Next TopicC# String Format()





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