class1.cs

来自「C#2005 实例源代码」· CS 代码 · 共 40 行

CS
40
字号
using System;

namespace Example_If
{
	
	/// <summary>
	/// Class1 的摘要说明。
	/// </summary>
	class Class1
	{
		
		/// <summary>
		/// 使用while
		/// </summary>
		public void test()
		{	
			//使用while
			int i=0;
			while(i<100)
			{
				Console.WriteLine(i.ToString()+":我不敢了!");
				i++;
			}
		}

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			//
			// TODO: 在此处添加代码以启动应用程序
			//
			Class1 c1=new Class1();
			c1.test();			
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?