Click here to Skip to main content
15,885,032 members
Articles / Programming Languages / C#

SCSI Library in C# - Burn CDs and DVDs, Access Hard Disks, etc.

Rate me:
Please Sign up or sign in to vote.
4.77/5 (48 votes)
19 Jun 2017Ms-PL6 min read 145.3K   8.1K   146  
Ever wonder how programs like Nero work? They make their own SCSI libraries... like this!
namespace System.ComponentModel
{
	[AttributeUsage(AttributeTargets.Field)]
	public class EnumValueDisplayNameAttribute : Attribute
	{
		private string _displayName;
		public static readonly DisplayNameAttribute Default = new DisplayNameAttribute();

		public EnumValueDisplayNameAttribute() : this(string.Empty) { }
		public EnumValueDisplayNameAttribute(string displayName) { this._displayName = displayName; }
		public override bool Equals(object obj) { if (obj == this) { return true; } var attribute = obj as EnumValueDisplayNameAttribute; return ((attribute != null) && (attribute.DisplayName == this.DisplayName)); }
		public override int GetHashCode() { return this.DisplayName.GetHashCode(); }
		public override bool IsDefaultAttribute() { return this.Equals(Default); }

		public virtual string DisplayName { get { return this.DisplayNameValue; } }
		protected string DisplayNameValue { get { return this._displayName; } set { this._displayName = value; } }
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions