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

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode() {
            if (toolboxItemTypeName != null) {
                return toolboxItemTypeName.GetHashCode();
            }
            return base.GetHashCode();
        }
    }

Usage Example

		public void DefaultType ()
		{
			ToolboxItemAttribute attr = new ToolboxItemAttribute (true);
			
			Type toolboxItemType = typeof(global::System.Drawing.Design.ToolboxItem);

			Assert.AreEqual (toolboxItemType.AssemblyQualifiedName, attr.ToolboxItemTypeName, "#1");
			Assert.AreEqual (toolboxItemType, attr.ToolboxItemType, "#2");
			Assert.AreEqual (true, attr.IsDefaultAttribute (), "#3");
			Assert.AreEqual (attr.ToolboxItemTypeName.GetHashCode (), attr.GetHashCode (), "#4");

			Assert.AreEqual (toolboxItemType.AssemblyQualifiedName, ToolboxItemAttribute.Default.ToolboxItemTypeName, "#5");
			Assert.AreEqual (toolboxItemType, ToolboxItemAttribute.Default.ToolboxItemType, "#2");
			Assert.AreEqual (true, ToolboxItemAttribute.Default.IsDefaultAttribute (), "#3");
			Assert.AreEqual (ToolboxItemAttribute.Default.ToolboxItemTypeName.GetHashCode (), attr.GetHashCode (), "#4");
		}
All Usage Examples Of System.ComponentModel.ToolboxItemAttribute::GetHashCode