Use the Min method to return and display the smaller of two UInt64 variables. : ULong « Data Types « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Data Types » ULongScreenshots 
Use the Min method to return and display the smaller of two UInt64 variables.
  

Class Sample
   Public Shared Sub Main()
      Dim nl As String = Environment.NewLine

      Dim xByte1 As Byte = 1
      Dim xByte2 As Byte = 5
      Dim xShort1 As Short = -2
      Dim xShort2 As Short = 5
      Dim xInt1 As Integer = -3
      Dim xInt2 As Integer = 5
      Dim xLong1 As Long = -4
      Dim xLong2 As Long = 5
      Dim xSingle1 As Single = 5F
      Dim xSingle2 As Single = 55F
      Dim xDouble1 As Double = 6.0
      Dim xDouble2 As Double = 56.0
      Dim xDecimal1 As [Decimal7D
      Dim xDecimal2 As [Decimal57D

      Dim xSbyte1 As SByte = 1
      Dim xSbyte2 As SByte = 2
      Dim xUshort1 As UShort = 2
      Dim xUshort2 As UShort = 3
      Dim xUint1 As UInteger = 5
      Dim xUint2 As UInteger = 7
      Dim xUlong1 As ULong = 8
      Dim xUlong2 As ULong = 9

      Console.WriteLine(Math.Min(xByte1, xByte2))
      Console.WriteLine(Math.Min(xShort1, xShort2))
      Console.WriteLine(Math.Min(xInt1, xInt2))
      Console.WriteLine(Math.Min(xLong1, xLong2))
      Console.WriteLine(Math.Min(xSingle1, xSingle2))
      Console.WriteLine(Math.Min(xDouble1, xDouble2))
      Console.WriteLine(Math.Min(xDecimal1, xDecimal2))

      Console.WriteLine(Math.Min(xSbyte1, xSbyte2))
      Console.WriteLine(Math.Min(xUshort1, xUshort2))
      Console.WriteLine(Math.Min(xUInt1, xUInt2))
      Console.WriteLine(Math.Min(xUlong1, xUlong2))
   End Sub
End Class 

   
    
  
Related examples in the same category
1.Append ULong data type values to a StringBuilder object.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.