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

📄 class1.cs

📁 提供了大量初学CSharp的示例
💻 CS
字号:
using System;

namespace MultiInherit
{
	interface IVi
	{
		void Read();
	}

	abstract class Document
	{
		public  void Write(String str)
		{
			Console.WriteLine("Write Document:{0}", str);
		}
	}

	class Note:Document,IVi
	{
		public void Read()
		{
			Console.WriteLine("Read Note");
		}
		public void Write(string msg)
		{
			Console.WriteLine("Write message into Note {0}", msg);
		}
	}

	class MultiTest
	{
		static void Main()
		{
			IVi note = new Note();
			note.Read();
			Note theNote = (Note)note;
			theNote.Write("This is a test");

			Note doc = new Note();
			doc.Write("Document");
			Document doc1 = doc as Document;
			doc1.Write("After change");
		}
	}
}

⌨️ 快捷键说明

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