So, in my last post I said that the template would be the last for a while, but here is one more.
This template creates a Windows Library with a simple class definition. The template can be found on the Visual Studio Gallery:
When the template is installed you get the following template added to your F# folder when creating a new F# project:
This template also defines several Item Templates for creating the following project items:
The simple F# class generated code is as follows:
The F# interface definition is as follows:
The more interesting Item Template is the F# Class that implements the IDisposable Interface. This template provides the core code for dealing with both managed and unmanaged resources:
Using a class defined in this manner allows one to clean-up the class resources with a use binding.
Once again, hopefully you will find this template useful.
Written by Carl Nolan