⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class1.cs

📁 OOP With Microsoft VB.NET And Csharp Step By Step
💻 CS
字号:
using System;

namespace MoveIt
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	class Class1
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			IMoveable mover =new Pawn();
			mover.X =10;
			mover.Y =10;
			Console.WriteLine("X:{0} Y:{1}",mover.X, mover.Y);
			Console.WriteLine("Moving up 5 spaces.");
			mover.Move(Direction.Up, 5);
			Console.WriteLine("X:{0} Y:{1}",mover.X, mover.Y);
			Pawn pawn =(Pawn)mover;
			Console.WriteLine("Is the pawn captured? {0}",pawn.Captured);
		}
	}
}

⌨️ 快捷键说明

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