using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo
{
class Program
{
static void Main(string[] args)
{
const string myName = "jiqing"; // 定义了一个字符串常量
string name;
Console.WriteLine("请输入您的名字:");
name = Console.ReadLine();
if (name.ToLower() == myName)
{
Console.WriteLine("好巧,我们名字一样!");
} else
{
Console.WriteLine("我们名字不一样!");
}
Console.ReadKey();
}
}
}
转载于:https://www.cnblogs.com/jiqing9006/p/6715114.html