Question:You are creating a class to compare a specially-formatted string. The default collation comparisons do not apply. You need to implement the IComparable(Of String) interface. Which code segment should you use? 

A Public Class Person
Implements IComparable(Of String)
Public Function CompareTo(ByVal other As String) _
As Boolean Implements IComparable(Of String).
CompareTo
...
End Function
End Class 

B Public Class Person
Implements IComparable(Of String)
Public Function CompareTo(ByVal other As String) As _ Integer Implements IComparable(Of String).
CompareTo
...
End Function
End Class 

C Public Class Person
Implements IComparable(Of String)
Public Function CompareTo(ByVal other As Object) _
As Boolean Implements IComparable(Of String).CompareTo
...
End Function
End Class 

D Public Class Person
Implements IComparable(Of String)
Public Function CompareTo(ByVal other As Object) As _ Integer Implements IComparable(Of String).
CompareTo
...
End Function
End Class 

+ Answer
+ Report
Total Preview: 1111

Copyright © 2024. Powered by Intellect Software Ltd