Thursday, January 03, 2013 1:59 AM
I have started to learn F# because it looked like fsi.exe would be a rapid way to experiment with various .NET API functions interactively.
But I recently discovered that LINQPAD can interactively execute F#, C#, VB.net code for testing invocations of various .NET API .
Which tool do you like for experimenting with .NET APIs? LINQPAD, fsi or something else?
What about experimenting with invocations of the Win32/Win64 API? Writing of up C++ program to better understand a certain USER32 call (or lanmgr call) is tedious. Using powershell for calling these functions is even more tedious because you need to write it in C# and then embed that into the powershell source code. The best option seems to be Python for calling the Win32/64 api.
What is your favorite tool for this?
Thursday, January 03, 2013 3:02 PM
My favorite tool is F# script file (*.fsx) with F# interactive window in Visual Studio.
Because of F# syntax (briefness and type inference) is much easier to explore any .NET API.
Using native .NET interop it's pretty easy to call Win32/Win64 API functions. (If you have a book Expert F# 3.0, Ch. 18 is dedicated to explain F# interop with native code libraries)
In F# interactive window you can easily get rough estimates about performance of your code using #time directive (I don't remember such feature in LINQPAD).
LINQPAD is a great tool but honestly I don't need anything else it if I have VisualStudio with F# installed.