简体   繁体   中英

Do you know of a good F# and C# interop example available?

I am going to write a C# WinForms application which will run a long data-crunching task in a BackgroundWorker, show progress in a ProgressBar and have buttons to start, pause, resume and cancel the operation. I'd like to write the calculation in F#. Do you know of any good examples or readings available in the Web which can help me?

Luke Hoban in F# team has a video at PDC 2009. There is a concurrent image downloader using asynchronous programming, which does not block GUI thread. This example also illustrates how to use C#(GUI) to call F# module(the image downloader).

The example is at the second half of the video.

You might also find this article helpful.


Edit: I realize the article I'm pointing at is all F# (not really using interop) but it does demonstrate parallel programming with F# so it does seem appropriate to the question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM