Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BinaryWriter::Write Method (Decimal)

 

Writes a decimal value to the current stream and advances the stream position by sixteen bytes.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual void Write(
	Decimal value
)

Parameters

value
Type: System::Decimal

The decimal value to write.

Exception Condition
IOException

An I/O error occurs.

ObjectDisposedException

The stream is closed.

The following table lists examples of other typical or related I/O tasks.

To do this...

See the example in this topic...

Create a text file.

How to: Write Text to a File

Write to a text file.

How to: Write Text to a File

Read from a text file.

How to: Read Text from a File

Append text to a file.

How to: Open and Append to a Log File

File::AppendText

FileInfo::AppendText

Get the size of a file.

FileInfo::Length

Get the attributes of a file.

File::GetAttributes

Set the attributes of a file.

File::SetAttributes

Determine if a file exists.

File::Exists

Read from a binary file.

How to: Read and Write to a Newly Created Data File

Write to a binary file.

How to: Read and Write to a Newly Created Data File

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft