Write a C# Sharp program to display the number of ticks that have elapsed since the beginning of the twenty-first century and to instantiate a TimeSpan object using the Ticks property
- برمجة سي شارب
- برمجة
- 2021-05-31
- ahmadghneem
الأجوبة
using System;
using System.Globalization;
public class Example6
{
public static void Main()
{
DateTime localDate = DateTime.Now;
DateTime utcDate = DateTime.UtcNow;
String[] cultureNames = { "en-JM", "en-NZ", "fr-BE",
"de-CH", "nl-NL" } ;
foreach (var cultureName in cultureNames) {
var culture = new CultureInfo(cultureName);
Console.WriteLine("{0}:", culture.NativeName);
Console.WriteLine(" Local date and time: {0}, {1:G}",
localDate.ToString(culture), localDate.Kind);
Console.WriteLine(" UTC date and time: {0}, {1:G}\n",
utcDate.ToString(culture), utcDate.Kind);
}
}
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال