/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System/Version/Overview/fsharp/comparisons1.fs
19 строк
379 B
Genevieve Warren
Add remarks for core types (#38970)
05 янв 2024, 22:14
Не верифицирован
05 янв 2024, 22:14
71d1377
Код
Авторство
О чём код?
module comparisons1 // <Snippet1> open System let v1 = Version(2, 0) let v2 = Version "2.1" printf $"Version {v1} is " match v1.CompareTo v2 with | 0 -> printf "the same as" | 1 -> printf "later than" | _ -> printf "earlier than" printf $" Version {v2}." // The example displays the following output: // Version 2.0 is earlier than Version 2.1. // </Snippet1>