Cache.Count 속성

정의

캐시에 저장된 항목의 수를 가져옵니다.

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

속성 값

Int32

캐시에 저장된 항목의 수입니다.

예제

다음 예제에서는 속성의 Count 값을 가져오고 문자열로 변환하고 웹 서버 컨트롤Label1의 속성에 Text 문자열을 Label 할당합니다.

// Convert the Count property to a string
// and display its value in a Label server control. 
Label1.Text = "The number of items in the cache:" + Cache.Count.ToString();
' Convert the Count property to a string
' and display its value in a Label server control.    
 Label1.Text = "The number of items in the cache:" + Cache.Count.ToString()

설명

ASP.NET 추적 기능을 사용 하는 경우 또는 애플리케이션의 성능을 모니터링 하는 경우이 속성은 유용할 수 있습니다.

적용 대상