本文整理匯總了C#中System.ComponentModel.SortDescription.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# SortDescription.Equals方法的具體用法?C# SortDescription.Equals怎麽用?C# SortDescription.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.ComponentModel.SortDescription
的用法示例。
在下文中一共展示了SortDescription.Equals方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OperatorTest
public void OperatorTest()
{
SortDescription left = new SortDescription ("A", ListSortDirection.Ascending);
SortDescription same = new SortDescription ("A", ListSortDirection.Ascending);
SortDescription diffProp = new SortDescription ("B", ListSortDirection.Ascending);
SortDescription diffDir = new SortDescription ("A", ListSortDirection.Descending);
Assert.IsTrue (left == same, "OP_#1");
Assert.IsFalse (left == diffProp, "OP_#2");
Assert.IsFalse (left == diffDir, "OP_#3");
Assert.IsFalse (left == null, "OP_#4");
Assert.IsFalse (left != same, "OP_#5");
Assert.IsTrue (left != diffProp, "OP_#6");
Assert.IsTrue (left != diffDir, "OP_#7");
Assert.IsTrue (left != null, "OP_#8");
Assert.IsTrue (left.Equals (same), "OP_#9");
Assert.IsFalse (left.Equals (diffProp), "OP_#10");
Assert.IsFalse (left.Equals (diffDir), "OP_#11");
Assert.IsFalse (left.Equals (null), "OP_#12");
}