C# BitConverter GetBytes(UInt32)
Description
BitConverter GetBytes(UInt32)
returns the specified
32-bit unsigned integer value as an array of bytes.
Syntax
BitConverter.GetBytes(UInt32)
has the following syntax.
[CLSCompliantAttribute(false)]
public static byte[] GetBytes(
uint value
)
Parameters
BitConverter.GetBytes(UInt32)
has the following parameters.
value
- The number to convert.
Returns
BitConverter.GetBytes(UInt32)
method returns
Example
using System;/* www .j a va 2 s. com*/
class GetBytesUInt64Demo
{
public static void Main( )
{
byte[ ] byteArray = BitConverter.GetBytes( (UInt32)1000 );
Console.WriteLine(BitConverter.ToString( byteArray ) );
}
}
The code above generates the following result.