Class Sample
Public Shared Sub Main()
Dim xSbyte1 As SByte = -101
Console.WriteLine(xSbyte1)
Console.WriteLine(Test(Math.Sign(xSbyte1)))
End Sub
Public Shared Function Test([compare] As Integer) As [String]
If [compare] = 0 Then
Return "equal to"
ElseIf [compare] < 0 Then
Return "less than"
Else
Return "greater than"
End If
End Function
End Class
|