Class WorkingTime
名称: Aspose.Tasks 集合: Aspose.Tasks.dll (25.4.0)
代表一周工作时间。
[ClassInterface(ClassInterfaceType.AutoDual)]
public class WorkingTime
Inheritance
继承人
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
WorkingTime(日期,日期)
启动 Aspose.Tasks.WorkingTime 类的新例子,与指定开始和结束时间的间隔。
public WorkingTime(DateTime fromTime, DateTime toTime)
Parameters
fromTime
DateTime
间隔开始时间
toTime
DateTime
间隔终止时间
WorkingTime(TimeSpan 和 TimeSpan)
启动 Aspose.Tasks.WorkingTime 类的新例子,包含指定的开始和结束时间的间隔项目。
public WorkingTime(TimeSpan fromTime, TimeSpan toTime)
Parameters
fromTime
TimeSpan
间隔的开始时间由 System.TimeSpan 结构代表。
toTime
TimeSpan
间隔的终点时间由 System.TimeSpan 结构代表。
Examples
WorkingTime ctor 的过量可以用来启动间隔的开始和结束,使用 TimeSpans:var wt = new WorkingTime(new TimeSpan(9, 0, 0), new TimeSpan(18, 0, 0));
Exceptions
当 toTime 比 toTime 平等的论点或当从Time 和 toTime 之间的间隔超过 24 小时时。
WorkingTime(int , int , int)
启动 Aspose.Tasks.WorkingTime 类的新例子,包含指定的开始和结束时间的间隔项目。
public WorkingTime(int fromHours, int toHours)
Parameters
fromHours
int
间隔的开始时间由整个小时数量(0-24 )代表。
toHours
int
间隔的终止时间由整个小时数量(0-24 )代表。
Examples
WorkingTime ctor 的过量负担可以用来启动间隔的开始和结束,使用整个小时:var wt = new WorkingTime(9, 13);
Exceptions
当 toTime 比 toTime 平等的论点或当从Time 和 toTime 之间的间隔超过 24 小时时。
Properties
From
这是一个工作时间的开始。
public DateTime From { get; }
财产价值
To
工作时间结束了。
public DateTime To { get; }
财产价值
Methods
Equals(对象)
检查物品是平等的。
public override bool Equals(object obj)
Parameters
obj
object
第二个对象是比较的。
Returns
如果对象是平等的,否则是假的。
GetHashCode()
返回对 Aspose.Tasks.WorkingTime 类的标签代码值。
public override int GetHashCode()
Returns
返回此对象的哈希代码值。