本文为原创文章、源代码为原创代码,如转载/复制,请在网页/代码处明显位置标明原文名称、作者及网址,谢谢!
开发工具:VS2017
语言:C#
DotNet版本:.Net FrameWork 4.0及以上
一、为了演示使用程序读取控制台数据,现在需要编写一个控制台程序,代码如下:
using System; namespace Test { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); string content = Console.ReadLine(); if(content.ToUpper() == "TEST"