ManagementDateTimeConverter 类

定义

提供将 DMTF 日期时间和时间间隔转换为符合 CLR 的 DateTimeTimeSpan 格式(或执行相反转换)的方法。Provides methods to convert DMTF datetime and time intervals to CLR-compliant DateTime and TimeSpan format and vice versa.

public ref class ManagementDateTimeConverter sealed
public sealed class ManagementDateTimeConverter
type ManagementDateTimeConverter = class
Public NotInheritable Class ManagementDateTimeConverter
继承
ManagementDateTimeConverter

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToDateTime(String)

将给定的 DMTF 日期时间转换为 DateTimeConverts a given DMTF datetime to DateTime. 返回的 DateTime 将基于系统的当前时区。The returned DateTime will be in the current time zone of the system.

ToDmtfDateTime(DateTime)

将给定的 DateTime 转换为 DMTF 日期时间格式。Converts a given DateTime to DMTF datetime format.

ToDmtfTimeInterval(TimeSpan)

将给定的 TimeSpan 转换为 DMTF 时间间隔。Converts a given TimeSpan to DMTF time interval.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
ToTimeSpan(String)

将给定的 DMTF 时间间隔转换为 TimeSpanConverts a given DMTF time interval to a TimeSpan.

适用于