I am trying to learn F # and in the process of converting some C # code to F #.
I have the following C # method:
public async Task<Foo> GetFooAsync(byte[] content)
{
using (var stream = new MemoryStream(content))
{
return await bar.GetFooAsync(stream);
}
}
Where bar- this is some kind of private field, but GetFooAsyncreturns Task<Foo>.
How to translate this to F #?
Here is what I have now:
member public this.GetFooAsync (content : byte[]) =
use stream = new MemoryStream(content)
this.bar.GetFooAsync(stream)
Returns a Task.
source
share