Skip to main content
.NET Framework Class Library
BitConverter..::.GetBytes Method





Converts the specified data to an array of bytes.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List
 NameDescription
Public methodStatic memberGetBytes(Boolean)Returns the specified Boolean value as an array of bytes.
Public methodStatic memberGetBytes(Char)Returns the specified Unicode character value as an array of bytes.
Public methodStatic memberGetBytes(Double)Returns the specified double-precision floating point value as an array of bytes.
Public methodStatic memberGetBytes(Int16)Returns the specified 16-bit signed integer value as an array of bytes.
Public methodStatic memberGetBytes(Int32)Returns the specified 32-bit signed integer value as an array of bytes.
Public methodStatic memberGetBytes(Int64)Returns the specified 64-bit signed integer value as an array of bytes.
Public methodStatic memberGetBytes(Single)Returns the specified single-precision floating point value as an array of bytes.
Public methodStatic memberGetBytes(UInt16)Returns the specified 16-bit unsigned integer value as an array of bytes.
Public methodStatic memberGetBytes(UInt32)Returns the specified 32-bit unsigned integer value as an array of bytes.
Public methodStatic memberGetBytes(UInt64)Returns the specified 64-bit unsigned integer value as an array of bytes.
Top
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?