/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System/String/Overview/csharp/compare11.cs
18 строк
485 B
Genevieve Warren
Add remarks for core types (#38970)
05 янв 2024, 22:14
Не верифицирован
05 янв 2024, 22:14
71d1377
Код
Авторство
О чём код?
// <Snippet10> using System; using System.Globalization; using System.Threading; public class Example2 { public static void Main() { Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US"); Console.WriteLine(String.Compare("A", "a", StringComparison.CurrentCulture)); Console.WriteLine(String.Compare("A", "a", StringComparison.Ordinal)); } } // The example displays the following output: // 1 // -32 // </Snippet10>