/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System.Globalization/DateTimeFormatInfo/csharp/create2.cs
25 строк
622 B
Genevieve Warren
Extract remarks for System.Globalization* (#38912)
29 дек 2023, 20:03
Не верифицирован
29 дек 2023, 20:03
7f945f9
Код
Авторство
О чём код?
using System; using System.Globalization; public class Create2Ex { public static void Main() { // <Snippet4> DateTimeFormatInfo dtfi; dtfi = DateTimeFormatInfo.CurrentInfo; Console.WriteLine(dtfi.IsReadOnly); dtfi = CultureInfo.CurrentCulture.DateTimeFormat; Console.WriteLine(dtfi.IsReadOnly); dtfi = DateTimeFormatInfo.GetInstance(CultureInfo.CurrentCulture); Console.WriteLine(dtfi.IsReadOnly); // The example displays the following output: // True // True // True // </Snippet4> } }