ISessionStateItemCollection.Dirty 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 atau menetapkan nilai yang menunjukkan apakah koleksi telah ditandai sebagai diubah.
public:
property bool Dirty { bool get(); void set(bool value); };
public bool Dirty { get; set; }
member this.Dirty : bool with get, set
Public Property Dirty As Boolean
Nilai Properti
true
SessionStateItemCollection jika konten telah diubah; jika tidak, false
.
Contoh
Contoh kode berikut menunjukkan implementasi Dirty properti . Untuk contoh implementasi ISessionStateItemCollection lengkap antarmuka, lihat contoh yang disediakan untuk ISessionStateItemCollection gambaran umum antarmuka.
private bool pDirty = false;
public bool Dirty
{
get { return pDirty; }
set { pDirty = value; }
}
Private pDirty As Boolean = False
Public Property Dirty As Boolean Implements ISessionStateItemCollection.Dirty
Get
Return pDirty
End Get
Set
pDirty = value
End Set
End Property
Keterangan
Properti Dirty digunakan oleh SessionStateModule untuk menentukan apakah nilai dalam ISessionStateItemCollection implementasi telah dimodifikasi.
Dalam menerapkan ISessionStateItemCollection antarmuka, Anda harus menginisialisasi Dirty properti sebagai false
dan mengatur Dirty properti ke true
dalam implementasi Removemetode , RemoveAt, atau Clear .