C# Program to Compare Two Strings With If Condition – Programming, Pseudocode Example, C# Programming Example
C# C# Console

C# Program to Compare Two Strings With If Condition

In this example, you’ll learn How to compare  two strings in C# using if condition.

C# Code:

 

When you run the program, the output will be:

In the above program, we’ve two strings s1 and s2. We simply use equality operator (==) to compare the two strings, which compares the value Csharp to Python  and prints Not Equal.

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.