skipter

Equal word, IgnoreCase CSharp Basics

May 21st, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ConsoleApp4
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             String text = Console.ReadLine();
  13.             String text2 = Console.ReadLine();
  14.  
  15.             if (text.Equals(text2, StringComparison.InvariantCultureIgnoreCase))
  16.             {
  17.                 Console.WriteLine("yes");
  18.             } else
  19.             {
  20.                 Console.WriteLine("no");
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment