Bagikan melalui


EventLogInformation.Attributes Properti

Definisi

Mendapatkan atribut file dari file log yang terkait dengan log.

public:
 property Nullable<int> Attributes { Nullable<int> get(); };
public int? Attributes { get; }
member this.Attributes : Nullable<int>
Public ReadOnly Property Attributes As Nullable(Of Integer)

Nilai Properti

Mengembalikan nilai bilangan bulat. Nilai ini bisa null.

Keterangan

Nilai properti ini sama dengan yang berjenis FileAttributes . Untuk mempermudah bekerja dengan properti ini, Anda dapat mengonversi nilai ke jenis tersebut menggunakan kode berikut:

using System.Diagnostics.Eventing.Reader;
using System.IO;

EventLogInformation eventLogInformation;
FileAttributes? fileAttributes = (FileAttributes?)eventLogInformation.Attributes;
Imports System.Diagnostics.Eventing.Reader
Imports System.IO

Dim eventLogInformation As EventLogInformation
Dim fileAttributes = CType(eventLogInformation.Attributes, FileAttributes?)

Berlaku untuk

Lihat juga