DiagnosticsSettings.GetDefault 方法

定义

检索默认诊断设置。

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

返回

包含用户当前诊断设置的设置对象。

示例

// 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());

适用于