LoginSignup
0

More than 5 years have passed since last update.

比較対象の文字列が同じか判定するプログラム C#

Last updated at Posted at 2018-07-05

判定するプログラム文字列

判定するプログラム

using System;
namespace sample

{

    class Program
    {
        static void Main(string[] args)
        {
            string a = "abc";
            string b = "abc";

            if (a == b){
                Console.WriteLine("等しい");
            }
            else{
                Console.WriteLine("等しくない");
            }
        }
    }
}

実行結果

等しい

もし等しくなかったら「等しくない」と表示します

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0