本文整理汇总了C#中GSM.GetCallsByDate方法的典型用法代码示例。如果您正苦于以下问题:C# GSM.GetCallsByDate方法的具体用法?C# GSM.GetCallsByDate怎么用?C# GSM.GetCallsByDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GSM
的用法示例。
在下文中一共展示了GSM.GetCallsByDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
GSM phone = new GSM("lala", "sumsAng", "batman", 10000.99);
phone.MakeCall(DateTime.Now, "0899999999", 3.44);
phone.MakeCall(DateTime.Now.AddHours(3), "0899999999", 3.44);
phone.MakeCall(DateTime.Now.AddDays(99), "0889666999", 9.44);
phone.MakeCall(DateTime.Now.AddDays(5).AddHours(10), "0009666999", 9.44);
Console.WriteLine("Calls ordered by date: ");
foreach (DateTime timeOfCall in phone.GetCallsByDate())
{
Console.WriteLine(timeOfCall.ToString());
}
phone.DeleteCall(2);
Console.WriteLine("New calls: ");
foreach (DateTime timeOfCall in phone.GetCallsByDate())
{
Console.WriteLine(timeOfCall.ToString());
}
phone.ClearCallHistory();
Console.WriteLine("\nNothing will show, because history is deleted: ");
foreach (DateTime timeOfCall in phone.GetCallsByDate())
{
Console.WriteLine(timeOfCall.ToString());
}
}
示例2: Main
static void Main(string[] args)
{
GSM phone = new GSM("lala", "sumsAng", "batman", 10000.99);
phone.MakeCall(DateTime.Now, "0899999999", 3.44);
phone.MakeCall(DateTime.Now.AddHours(3), "0899999999", 3.44);
phone.MakeCall(DateTime.Now.AddDays(99), "0889666999", 9.44);
phone.MakeCall(DateTime.Now.AddDays(5).AddHours(10), "0009666999", 9.44);
Console.WriteLine("Calls ordered by date: ");
foreach (DateTime timeOfCall in phone.GetCallsByDate())
{
Console.WriteLine(timeOfCall.ToString());
}
}