ProjectPropertyComparator.Compare 方法 (DateTime, DateTime)
比较两个DateTime值,以确定其在排序顺序中的相对位置。
命名空间: Microsoft.Office.Project.Server.Library
程序集: Microsoft.Office.Project.Server.Library(位于 Microsoft.Office.Project.Server.Library.dll 中)
语法
声明
Public Shared Function Compare ( _
prop1 As DateTime, _
prop2 As DateTime _
) As Integer
用法
Dim prop1 As DateTime
Dim prop2 As DateTime
Dim returnValue As Integer
returnValue = ProjectPropertyComparator.Compare(prop1, _
prop2)
public static int Compare(
DateTime prop1,
DateTime prop2
)
参数
prop1
类型:System.DateTime要比较的第一个DateTime值。
prop2
类型:System.DateTime要比较的第二个DateTime值。
返回值
类型:System.Int32
返回"-1"的第一个日期早于第二个,如果为"1"如果开始日期晚于第二个,或返回"0",如果它们是相同的日期。