Udostępnij za pośrednictwem


EventLogInformation.Attributes Właściwość

Definicja

Pobiera atrybuty pliku dziennika skojarzonego z dziennikiem.

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)

Wartość właściwości

Zwraca wartość całkowitą. Ta wartość może być równa null.

Uwagi

Wartości tej właściwości są takie same jak te typu FileAttributes . Aby ułatwić pracę z tą właściwością, możesz przekonwertować wartość na ten typ przy użyciu następującego kodu:

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?)

Dotyczy

Zobacz też