Reputation: 12087
I have this in C#:
_RestClient.ConfigureWebRequest(r =>
{
r.ServicePoint.Expect100Continue = false;
r.KeepAlive = true;
});
what is the syntax to replicate this in F#?
Upvotes: 2
Views: 122
Reputation: 80734
Lambda-expressions in F# are denoted fun x -> ...
- equivalent to C# x => ...
Mutation (aka "assignment") is denoted x <- y
- equivalent to C# x = y
So, to put that all together, you'd get this:
_RestClient.ConfigureWebRequest(fun r ->
r.ServicePoint.Expect100Continue <- false
r.KeepAlive <- true
)
Upvotes: 1