IsolatedStorageFileStream.WriteByte(Byte) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将一个字节写入 IsolatedStorageFileStream 对象。
public:
override void WriteByte(System::Byte value);
public override void WriteByte (byte value);
override this.WriteByte : byte -> unit
Public Overrides Sub WriteByte (value As Byte)
参数
- value
- Byte
写入独立存储文件的字节值。
例外
写入尝试次数超过了 IsolatedStorageFileStream 对象的配额。
示例
下面的代码示例演示如何 WriteByte 使用 方法从 IsolatedStorageFileStream 对象读取数据。 有关此示例的完整上下文,请参阅 IsolatedStorageFileStream 概述。
Console::WriteLine( "Writing data to the new file." );
while ( source->Position < source->Length )
{
inputChar = (Byte)source->ReadByte();
target->WriteByte( (Byte)source->ReadByte() );
}
// Determine the size of the IsolatedStorageFileStream
// by checking its Length property.
Console::WriteLine( "Total Bytes Read: {0}", source->Length.ToString() );
Console.WriteLine("Writing data to the new file.");
while (source.Position < source.Length)
{
inputChar = (byte)source.ReadByte();
target.WriteByte(inputChar);
}
// Determine the size of the IsolatedStorageFileStream
// by checking its Length property.
Console.WriteLine("Total Bytes Read: " + source.Length);
Console.WriteLine("Writing data to the new file.")
While source.Position < source.Length
inputChar = CByte(source.ReadByte())
target.WriteByte(inputChar)
End While
' Determine the size of the IsolatedStorageFileStream
' by checking its Length property.
Console.WriteLine(("Total Bytes Read: " & source.Length))