Bagikan melalui


Cache.Count Properti

Definisi

Mendapatkan jumlah item yang disimpan dalam cache.

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

Nilai Properti

Jumlah item yang disimpan dalam cache.

Contoh

Contoh berikut mendapatkan nilai Count properti, mengonversinya menjadi string, dan menetapkan string ke Text properti Label kontrol server Web, Label1.

// 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()

Keterangan

Properti ini dapat berguna saat memantau performa aplikasi Anda atau saat menggunakan fungsionalitas pelacakan ASP.NET.

Berlaku untuk