IsolatedStorageFile.CurrentSize 속성

정의

주의

IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorageFile.UsedSize

주의

IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorageFile.UsedSize instead.

중요

이 API는 CLS 규격이 아닙니다.

격리된 스토리지의 현재 크기를 가져옵니다.

public:
 virtual property System::UInt64 CurrentSize { System::UInt64 get(); };
[System.CLSCompliant(false)]
[System.Obsolete("IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant.  To get the current size use IsolatedStorageFile.UsedSize")]
public override ulong CurrentSize { get; }
[System.CLSCompliant(false)]
[System.Obsolete("IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorageFile.UsedSize instead.")]
public override ulong CurrentSize { get; }
[System.CLSCompliant(false)]
public override ulong CurrentSize { get; }
[<System.CLSCompliant(false)>]
[<System.Obsolete("IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant.  To get the current size use IsolatedStorageFile.UsedSize")>]
member this.CurrentSize : uint64
[<System.CLSCompliant(false)>]
[<System.Obsolete("IsolatedStorageFile.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorageFile.UsedSize instead.")>]
member this.CurrentSize : uint64
[<System.CLSCompliant(false)>]
member this.CurrentSize : uint64
Public Overrides ReadOnly Property CurrentSize As ULong

속성 값

격리된 스토리지 범위 내에서 현재 사용되는 스토리지의 전체 바이트 수입니다.

특성

예외

해당 속성을 사용할 수 없는 경우. 현재 범위에 로밍 범위가 있거나 열리지 않았습니다.

현재 개체 크기가 정의되어 있지 않은 경우

예제

다음 코드 예제는 CurrentSize 속성입니다. 이 예제의 전체 컨텍스트는 개요를 참조하세요 IsolatedStorageFile .

StreamWriter^ writer = gcnew StreamWriter( isoStream );

// Update the data based on the new inputs.
writer->WriteLine( this->NewsUrl );
writer->WriteLine( this->SportsUrl );

// Calculate the amount of space used to record this user's preferences.
double d = isoFile->CurrentSize / isoFile->MaximumSize;
Console::WriteLine( "CurrentSize = {0}", isoFile->CurrentSize.ToString() );
Console::WriteLine( "MaximumSize = {0}", isoFile->MaximumSize.ToString() );
StreamWriter writer = new StreamWriter(isoStream);
// Update the data based on the new inputs.
writer.WriteLine(this.NewsUrl);
writer.WriteLine(this.SportsUrl);

// Calculate the amount of space used to record this user's preferences.
double d = isoFile.CurrentSize / isoFile.MaximumSize;
Console.WriteLine("CurrentSize = " + isoFile.CurrentSize.ToString());
Console.WriteLine("MaximumSize = " + isoFile.MaximumSize.ToString());
Dim writer As New StreamWriter(isoStream)
' Update the data based on the new inputs.
writer.WriteLine(Me.NewsUrl)
writer.WriteLine(Me.SportsUrl)

'  Calculate the amount of space used to record this user's preferences.
Dim d As Double = Convert.ToDouble(isoFile.CurrentSize) / Convert.ToDouble(isoFile.MaximumSize)
Console.WriteLine(("CurrentSize = " & isoFile.CurrentSize.ToString()))
Console.WriteLine(("MaximumSize = " & isoFile.MaximumSize.ToString()))

설명

격리된 스토리지 범위 내의 모든 파일 및 디렉터리의 총 사용량을 나타냅니다.

로밍 사용자 프로필에 참여하는 저장소에 대해 현재 크기를 정확하게 확인할 수 없습니다. 로밍 프로필은 종종 여러 클라이언트 컴퓨터에 캐시되고 나중에 서버와 동기화되므로 이러한 저장소에 대해 할당량을 적용할 수 없으며 현재 크기는 보고되지 않습니다.

방법: 격리된 스토리지 공간 부족 상태 예상 예제는 CurrentSize 속성의 사용을 보여줍니다.

적용 대상

추가 정보