Home  |  Delphi .net Home  |  System.Convert  |  ToUInt32 Method
ToUInt32  
Method  
Converts data from one data type to a UInt32 data type
Convert Class
System NameSpace
CF1.  Function ToUInt32 ( Value : Boolean; ) : UInt32;
CF2.  Function ToUInt32 ( Value : Byte; ) : UInt32;
CF3.  Function ToUInt32 ( Value : Char; ) : UInt32;
CF4.  Function ToUInt32 ( Value : DateTime; ) : UInt32;
CF5.  Function ToUInt32 ( Value : SmallInt; ) : UInt32;
CF6.  Function ToUInt32 ( Value : ShortInt; ) : UInt32;
CF7.  Function ToUInt32 ( Value : Integer; ) : UInt32;
CF8.  Function ToUInt32 ( Value : Int64; ) : UInt32;
CF9.  Function ToUInt32 ( Value : UInt64; ) : UInt32;
CF10.  Function ToUInt32 ( Value : Word; ) : UInt32;
CF11.  Function ToUInt32 ( Value : Single; ) : UInt32;
CF12.  Function ToUInt32 ( Value : Double; ) : UInt32;
CF13.  Function ToUInt32 ( Value : Decimal; ) : UInt32;
CF14.  Function ToUInt32 ( Value : UInt32; ) : UInt32;
CF15.  Function ToUInt32 ( Value : String; ) : UInt32;
CF16.  Function ToUInt32 ( Value:StringValue : String; FormatProvider : IFormatProvider; ) : UInt32;
CF17.  Function ToUInt32 ( Value : Object; ) : UInt32;
CF18.  Function ToUInt32 ( Value:ObjectValue : Object; FormatProvider : IFormatProvider; ) : UInt32; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Attempts to transfer the value from one of the given Value data types to UInt32.
 
The optional FormatProvider parameter determines the parsing rules and is beyond the scope of this article.
Notes
An exception is thrown if the conversion fails.
Microsoft MSDN Links
System
System.Convert
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  value : UInt32;
  myStr : String;

begin
  myStr  := '123456789';

  value  := System.Convert.ToUInt32(myStr);

  Console.WriteLine(value.ToString);

  Console.ReadLine;
end.
Show full unit code
  123456789
 
 
Delphi Programming © Neil Moffatt All rights reserved.  |  Contact the author