共用方式為


DiagnosticsSettings.GetDefault 方法

定義

擷取預設診斷設定。

public:
 static DiagnosticsSettings ^ GetDefault();
 static DiagnosticsSettings GetDefault();
public static DiagnosticsSettings GetDefault();
function getDefault()
Public Shared Function GetDefault () As DiagnosticsSettings

傳回

包含使用者目前診斷設定的 settings 物件。

範例

// From within a single user environment.
Windows.System.UserProfile.DiagnosticsSettings defaultUser =
    Windows.System.UserProfile.DiagnosticsSettings.GetDefault();

System.Diagnostics.Debug.WriteLine("Current user tailored experiences enabled: " +
    defaultUser.CanUseDiagnosticsToTailorExperiences.ToString());

適用於