/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/fundamentals/runtime-libraries/snippets/System/InvalidOperationException/Overview/fsharp/Enumerable3.fs
18 строк
510 B
Genevieve Warren
Remarks for exception types and Registry class (#38930)
03 янв 2024, 22:30
Не верифицирован
03 янв 2024, 22:30
932bcca
Код
Авторство
О чём код?
module Enumerable3 // <Snippet8> open System open System.Linq let dbQueryResults = [| 1; 2; 3; 4 |] let firstNum = dbQueryResults.First(fun n -> n > 4) printfn $"The first value greater than 4 is {firstNum}" // The example displays the following output: // Unhandled Exception: System.InvalidOperationException: // Sequence contains no matching element // at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate) // at <StartupCode$fs>.main() // </Snippet8>