Cache.Count Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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.