/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable4.fs
18 строк
394 B
Genevieve Warren
Remarks for exception types and Registry class (#38930)
03 янв 2024, 22:30
Не верифицирован
03 янв 2024, 22:30
932bcca
Код
Авторство
О чём код?
module Enumerable4 // <Snippet9> open System open System.Linq let dbQueryResults = [| 1; 2; 3; 4 |] let firstNum = dbQueryResults.FirstOrDefault(fun n -> n > 4) if firstNum = 0 then printfn "No value is greater than 4." else printfn $"The first value greater than 4 is {firstNum}" // The example displays the following output: // No value is greater than 4. // </Snippet9>