Skip to main content
.NET Framework Class Library
BinaryWriterWrite Method (UInt32)

Writes a four-byte unsigned integer to the current stream and advances the stream position by four bytes.

This API is not CLS-compliant. 

Namespace:   System.IO
Assemblies:   System.IO (in System.IO.dll)
  mscorlib (in mscorlib.dll)
Syntax
<[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_0_0_0%](False)> _
Public Overridable Sub Write ( _
	value As [%$TOPIC/d79ecdwh_en-us_VS_110_1_0_0_0_1%] _
)
[[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_1_0_0%](false)]
public virtual void Write(
	[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_1_0_1%] value
)
[[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_2_0_0%](false)]
public:
virtual void Write(
	[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_2_0_1%] value
)
[<[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_3_0_0%](false)>]
abstract Write : 
        value:[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_3_0_1%] -> unit 
[<[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_3_0_2%](false)>]
override Write : 
        value:[%$TOPIC/d79ecdwh_en-us_VS_110_1_0_3_0_3%] -> unit
public function Write(
	value : [%$TOPIC/d79ecdwh_en-us_VS_110_1_0_4_0_0%]
)

Parameters

value
Type: SystemUInt32

The four-byte unsigned integer to write.

Exceptions
ExceptionCondition
IOException

An I/O error occurs.

ObjectDisposedException

The stream is closed.

Remarks

BinaryWriter stores this data type in little endian format.

For a list of common I/O tasks, see Common I/O Tasks.

Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8