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)
BinaryWriter Members
System.IO Namespace
Reading Text from a File
Writing Text to a File
Assembly: mscorlib (in mscorlib.dll)
Syntax
Visual Basic (Declaration)
Public Overridable Sub Write ( _ value As Decimal _ )
Visual Basic (Usage)
Dim instance As BinaryWriter Dim value As Decimal instance.Write(value)
C#
public virtual void Write ( decimal value )
C++
public: virtual void Write ( Decimal value )
J#
public void Write ( Decimal value )
JScript
public function Write ( value : decimal )
XAML
Not applicable.
Parameters
- value
-
The decimal value to write.
Exceptions
| Exception type | Condition |
|---|---|
| An I/O error occurs. |
|
| The stream is closed. |
Remarks
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. | |
| Write to a text file. | |
| Read from a text file. | |
| Append text to a file. | |
| Get the size of a file. | |
| Get the attributes of a file. | |
| Set the attributes of a file. | |
| Determine if a file exists. | |
| Read from a binary file. | |
| Write to a binary file. |
Platforms
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Version Information
.NET Framework
Supported in: 3.0, 2.0, 1.1, 1.0See Also
Reference
BinaryWriter ClassBinaryWriter Members
System.IO Namespace
Other Resources
File and Stream I/OReading Text from a File
Writing Text to a File