When implemented by a class, compares a property of a data object with another data object property.
Namespace: Microsoft.VisualStudio.Data.Services.SupportEntities
Assembly: Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)
Syntax
'宣言
Function Compare ( _
typeName As String, _
propertyName As String, _
value1 As Object, _
value2 As Object _
) As Integer
'使用
Dim instance As IVsDataObjectMemberComparer
Dim typeName As String
Dim propertyName As String
Dim value1 As Object
Dim value2 As Object
Dim returnValue As Integer
returnValue = instance.Compare(typeName, _
propertyName, value1, value2)
int Compare(
string typeName,
string propertyName,
Object value1,
Object value2
)
int Compare(
String^ typeName,
String^ propertyName,
Object^ value1,
Object^ value2
)
function Compare(
typeName : String,
propertyName : String,
value1 : Object,
value2 : Object
) : int
Parameters
typeName
Type: System.StringThe name of an object type.
propertyName
Type: System.StringThe name of a property to compare.
value1
Type: System.ObjectThe first value to compare.
value2
Type: System.ObjectThe second value to compare.
Return Value
Type: System.Int32
A value less than zero if the identifier part is less than the specified value; zero if the identifier part is equal to the specified value; a value greater than zero if the identifier part is greater than the specified value.
Remarks
This method should use the same comparison rules as the data source to ensure the correct sorting of objects on the client side.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IVsDataObjectMemberComparer Interface
IVsDataObjectMemberComparer Members
Microsoft.VisualStudio.Data.Services.SupportEntities Namespace