PowerTCP Mail for .NET
CompareTo Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > MailAddress Class : CompareTo Method




obj
MailAddress to compare with.
Compares two MailAddresses based upon their Domain (first) and their User (second).

Syntax

Visual Basic (Declaration) 
Public Function CompareTo( _
   ByVal obj As Object _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As MailAddress
Dim obj As Object
Dim value As Integer
 
value = instance.CompareTo(obj)
C# 
public int CompareTo( 
   object obj
)
Managed Extensions for C++ 
public: int CompareTo( 
   Object* obj
) 
C++/CLI 
public:
int CompareTo( 
   Object^ obj
) 

Parameters

obj
MailAddress to compare with.

Return Value

Negative if less than obj, 0 if equal, and positive if greater than obj.

Remarks

This method is used by the MailAddress.RemoveDuplicates method

This method takes O(1) time for MailAddress objects with an Address less than 40 characters in length (taking time proportional to length with longer MailAddress objects), and is speed-optimized to enable high-speed sorting of the MailAddresses collection.

This compares by domain first, then user.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.