System.Collections.Generic列表和F#

Ton*_*ell 2 f#

我有一个C#类返回一个List,使用System.Collections.Generic列表而不是F#List

我想迭代列表以找到一个对象或找不到它.这是我在C#中的表现.我将如何在F#中完成类似的事情

foreach (AperioCaseObj caseObj in CaseList)
{
     if (caseObj.CaseId == "")
     {    
     }
     else
     { 
     }
}
Run Code Online (Sandbox Code Playgroud)

Der*_*ger 7

match Seq.tryfind ((=) "") caseList with
      None -> print_string "didn't find it"
    | Some s -> printfn "found it: %s" s
Run Code Online (Sandbox Code Playgroud)