Microsoft\VisualBasic\CompilerServices\Operators.vb (140)
138Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
141Case CompareClass.Unordered
143Case CompareClass.UserDefined
145Case CompareClass.Undefined
148Debug.Assert(comparison = CompareClass.Less OrElse
149comparison = CompareClass.Equal OrElse
150comparison = CompareClass.Greater)
157Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
160Case CompareClass.Unordered
162Case CompareClass.UserDefined
164Case CompareClass.Undefined
167Debug.Assert(comparison = CompareClass.Less OrElse
168comparison = CompareClass.Equal OrElse
169comparison = CompareClass.Greater)
176Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
179Case CompareClass.Unordered
181Case CompareClass.UserDefined
183Case CompareClass.Undefined
186Debug.Assert(comparison = CompareClass.Less OrElse
187comparison = CompareClass.Equal OrElse
188comparison = CompareClass.Greater)
195Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
198Case CompareClass.Unordered
200Case CompareClass.UserDefined
202Case CompareClass.Undefined
205Debug.Assert(comparison = CompareClass.Less OrElse
206comparison = CompareClass.Equal OrElse
207comparison = CompareClass.Greater)
214Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
217Case CompareClass.Unordered
219Case CompareClass.UserDefined
221Case CompareClass.Undefined
224Debug.Assert(comparison = CompareClass.Less OrElse
225comparison = CompareClass.Equal OrElse
226comparison = CompareClass.Greater)
233Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
236Case CompareClass.Unordered
238Case CompareClass.UserDefined
240Case CompareClass.Undefined
243Debug.Assert(comparison = CompareClass.Less OrElse
244comparison = CompareClass.Equal OrElse
245comparison = CompareClass.Greater)
252Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
255Case CompareClass.Unordered
257Case CompareClass.UserDefined
259Case CompareClass.Undefined
262Debug.Assert(comparison = CompareClass.Less OrElse
263comparison = CompareClass.Equal OrElse
264comparison = CompareClass.Greater)
271Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
274Case CompareClass.Unordered
276Case CompareClass.UserDefined
278Case CompareClass.Undefined
281Debug.Assert(comparison = CompareClass.Less OrElse
282comparison = CompareClass.Equal OrElse
283comparison = CompareClass.Greater)
290Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
293Case CompareClass.Unordered
295Case CompareClass.UserDefined
297Case CompareClass.Undefined
300Debug.Assert(comparison = CompareClass.Less OrElse
301comparison = CompareClass.Equal OrElse
302comparison = CompareClass.Greater)
309Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
312Case CompareClass.Unordered
314Case CompareClass.UserDefined
316Case CompareClass.Undefined
319Debug.Assert(comparison = CompareClass.Less OrElse
320comparison = CompareClass.Equal OrElse
321comparison = CompareClass.Greater)
328Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
331Case CompareClass.Unordered
333Case CompareClass.UserDefined
335Case CompareClass.Undefined
338Debug.Assert(comparison = CompareClass.Less OrElse
339comparison = CompareClass.Equal OrElse
340comparison = CompareClass.Greater)
347Dim comparison As CompareClass = CompareObject2(Left, Right, TextCompare)
350Case CompareClass.Unordered
352Case CompareClass.UserDefined
354Case CompareClass.Undefined
357Debug.Assert(comparison = CompareClass.Less OrElse
358comparison = CompareClass.Equal OrElse
359comparison = CompareClass.Greater)
364Private Shared Function CompareObject2(ByVal left As Object, ByVal right As Object, ByVal textCompare As Boolean) As CompareClass
441Return CType(CompareString(Nothing, Convert.ToString(right), textCompare), CompareClass)
728Return CType(CompareString(Convert.ToString(left), Convert.ToString(right), textCompare), CompareClass)
731Return CType(CompareString(Convert.ToString(left), Nothing, textCompare), CompareClass)
756Return CompareClass.UserDefined
759Return CompareClass.Undefined
762Private Shared Function CompareBoolean(ByVal left As Boolean, ByVal right As Boolean) As CompareClass
763If left = right Then Return CompareClass.Equal
764If left > right Then Return CompareClass.Greater
765Return CompareClass.Less
768Private Shared Function CompareInt32(ByVal left As Int32, ByVal right As Int32) As CompareClass
769If left = right Then Return CompareClass.Equal
770If left > right Then Return CompareClass.Greater
771Return CompareClass.Less
774Private Shared Function CompareUInt32(ByVal left As UInt32, ByVal right As UInt32) As CompareClass
775If left = right Then Return CompareClass.Equal
776If left > right Then Return CompareClass.Greater
777Return CompareClass.Less
780Private Shared Function CompareInt64(ByVal left As Int64, ByVal right As Int64) As CompareClass
781If left = right Then Return CompareClass.Equal
782If left > right Then Return CompareClass.Greater
783Return CompareClass.Less
786Private Shared Function CompareUInt64(ByVal left As UInt64, ByVal right As UInt64) As CompareClass
787If left = right Then Return CompareClass.Equal
788If left > right Then Return CompareClass.Greater
789Return CompareClass.Less
793Private Shared Function CompareDecimal(ByVal left As Object, ByVal right As Object) As CompareClass
798Return CompareClass.Equal
800Return CompareClass.Greater
802Return CompareClass.Less
806Private Shared Function CompareSingle(ByVal left As Single, ByVal right As Single) As CompareClass
807If left = right Then Return CompareClass.Equal
808If left < right Then Return CompareClass.Less
809If left > right Then Return CompareClass.Greater
810Return CompareClass.Unordered
813Private Shared Function CompareDouble(ByVal left As Double, ByVal right As Double) As CompareClass
814If left = right Then Return CompareClass.Equal
815If left < right Then Return CompareClass.Less
816If left > right Then Return CompareClass.Greater
817Return CompareClass.Unordered
820Private Shared Function CompareDate(ByVal left As Date, ByVal right As Date) As CompareClass
825Return CompareClass.Equal
827Return CompareClass.Greater
829Return CompareClass.Less
833Private Shared Function CompareChar(ByVal left As Char, ByVal right As Char) As CompareClass
834If left = right Then Return CompareClass.Equal
835If left > right Then Return CompareClass.Greater
836Return CompareClass.Less
842Return CompareClass.Equal
847Return CompareClass.Equal
850Return CompareClass.Less
855Return CompareClass.Equal
858Return CompareClass.Greater
871Return CompareClass.Equal
873Return CompareClass.Greater
875Return CompareClass.Less