PerformanceCounter.InstanceLifetime 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置进程的生存期。
public:
property System::Diagnostics::PerformanceCounterInstanceLifetime InstanceLifetime { System::Diagnostics::PerformanceCounterInstanceLifetime get(); void set(System::Diagnostics::PerformanceCounterInstanceLifetime value); };
public System.Diagnostics.PerformanceCounterInstanceLifetime InstanceLifetime { get; set; }
member this.InstanceLifetime : System.Diagnostics.PerformanceCounterInstanceLifetime with get, set
Public Property InstanceLifetime As PerformanceCounterInstanceLifetime
属性值
PerformanceCounterInstanceLifetime 值之一。 默认值为 Global。
例外
注解
如果使用 .NET Framework 版本 1.0 或 1.1 创建性能计数器类别,则它使用全局共享内存,并且其值InstanceLifetime必须为 Global。 如果.NET Framework版本 1.0 或 1.1 上运行的应用程序不使用该类别,请删除并重新创建该类别。
备注
CounterType如果属性值为 SingleInstance,InstanceLifetime则性能计数器的值必须为 Global。