IsolatedStorageFileStream.Length プロパティ
IsolatedStorageFileStream 長を取得します。
Overrides Public ReadOnly Property Length As Long
[C#]
public override long Length {get;}
[C++]
public: __property __int64 get_Length();
[JScript]
public override function get Length() : long;
プロパティ値
バイト単位の IsolatedStorageFileStream 長。
解説
Length は、ファイルの現在のバイト数を表します。これは、分離ストレージ クオータの影響を受けません。
使用例
[Visual Basic, C#, C++] 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))
[C#]
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);
[C++]
Console::WriteLine(S"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(S"Total Bytes Read: {0}", source->Length.ToString());
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
IsolatedStorageFileStream クラス | IsolatedStorageFileStream メンバ | System.IO.IsolatedStorage 名前空間