本文整理汇总了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");
}