System.Linq.Enumerable.OfType<T> - is there a F# way?
问题 I'm looking to use the F# WSDL Type Provider. To call the web service I am using, I need to attach my client credentials to the System.ServiceModel.Description.ClientCredentials . This is the C# code I have: var serviceClient = new InvestmentServiceV1Client.InvestmentServiceV1Client(); foreach (ClientCredentials behaviour in serviceClient.Endpoint.Behaviors.OfType<ClientCredentials>()) { (behaviour).UserName.UserName = USERNAME; (behaviour).UserName.Password = PASSWORD; break; } This is the F