FirstOrDefault In F#

前端 未结 4 1111
孤街浪徒
孤街浪徒 2021-01-17 12:27

How to write FirstOrDefault Linq Query in F#? Can I use linq to sql in F# in totally?

4条回答
  •  不要未来只要你来
    2021-01-17 12:44

    Note that a more idiomatic approach within F# would probably be to use something along the lines of Seq.tryFind rather than to use the LINQ operators, although it's not a drop in replacement since it returns an option value.

提交回复
热议问题