本文整理匯總了C#中System.Drawing.Printing.Margins.GetHashCode方法的典型用法代碼示例。如果您正苦於以下問題:C# Margins.GetHashCode方法的具體用法?C# Margins.GetHashCode怎麽用?C# Margins.GetHashCode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Drawing.Printing.Margins
的用法示例。
在下文中一共展示了Margins.GetHashCode方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Ctor4Int
public void Ctor4Int ()
{
Margins m1 = new Margins (Int32.MaxValue, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue);
Assert.AreEqual (Int32.MaxValue, m1.Left, "Left");
Assert.AreEqual (Int32.MaxValue, m1.Top, "Top");
Assert.AreEqual (Int32.MaxValue, m1.Right, "Right");
Assert.AreEqual (Int32.MaxValue, m1.Bottom, "Bottom");
// right smaller than left
Margins m2 = new Margins (Int32.MaxValue, 0, 10, 20);
// bottom smaller than top
Margins m3 = new Margins (10, 20, Int32.MaxValue, 0);
Assert.IsFalse (m2.GetHashCode () == m3.GetHashCode (), "GetHashCode");
Assert.IsTrue (m1 != m2, "m1 != m2");
Assert.IsFalse (m1 == m2, "m1 == m2");
}