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

📄 element.cs

📁 树的简单使用方法和基本操作,这是一个CS程序.
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace TreeTest
{
	//-----------------------------------------------------------------------------
	// Element

	[Serializable]
	public class Element //: IDeepCopy
	{
		private string _Data = String.Empty;

		public string Data
		{
			get { return _Data; }
			set { _Data = value; }
		}

		// Support XmlSerialization
		private Element() { }

		public Element( string s )
		{
			_Data = s;
		}

#if true
		public Element( Element o )
		{
			_Data = o._Data + " *COPYCTOR*";
		}
#endif
		public override bool Equals( object obj )
		{
			if ( obj == null ) return false;

			Element o = obj as Element;
			if ( o == null ) { Debug.Assert( false ); return false; }

			return _Data == o._Data;
		}

		public override int GetHashCode()
		{
			return _Data.GetHashCode();
		}

		public override string ToString()
		{
			return _Data;
		}

		public object CreateDeepCopy()
		{
			return new Element( _Data + " *DEEPCOPY*" );
		}
	}

	//-----------------------------------------------------------------------------

}

⌨️ 快捷键说明

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