System.ComponentModel.DisplayNameAttribute.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode() { throw null; }
        public override bool IsDefaultAttribute() { throw null; }        

Usage Example

		public void GetHashCodeTest ()
		{
			DisplayNameAttribute dn = new DisplayNameAttribute ();
			Assert.AreEqual (string.Empty.GetHashCode (), dn.GetHashCode (), "#A1");
			dn = new DisplayNameAttribute ("A");
			Assert.AreEqual ("A".GetHashCode (), dn.GetHashCode (), "#A2");

			// https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=288534
			dn = new DisplayNameAttribute (null);
			try {
				dn.GetHashCode ();
				Assert.Fail ("#B1");
			} catch (NullReferenceException) {
			}
		}