Use the Sign(SByte) method to determine the sign of a SByte value and display it to the console. : SByte « Data Types « VB.Net






Use the Sign(SByte) method to determine the sign of a SByte value and display it to the console.

   
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

   
    
    
  








Related examples in the same category

1.SByte.MaxValue represents the largest possible value of SByte.
2.SByte.Parse converts string number to 8-bit signed integer.
3.SByte.Parse converts string in a culture-specific format to its 8-bit signed integer
4.SByte.Parse converts string in a style to 8-bit signed integer equivalent.
5.SByte.Parse Method converts string is in a style and culture-specific format to 8-bit signed equivalent.
6.SByte.ToString converts its string using the specified culture-specific format information.
7.SByte.ToString converts to string representation using the specified format.
8.SByte.ToString Method converts to string using the specified format and culture-specific format information.
9.SByte.TryParse tries to convert string in a style and culture-specific format to SByte
10.SByte.TryParse tries to convert string to SByte equivalent
11.Assign SByte to Integer