on 10/19/2010 2:53 PM
In F#, class constructors can be declared in several different ways. To declare a non-static class, one usually defines a primary constructor, plus zero or more additional constructors. To declare a static class, one usually defines a module. Using a Primary Constructor In F#, it is possible to create a thread-safe singleton with just three lines of code: /// A public thread-safe singleton class in F#, /// using a private primary constructor. type Singleton private() = static let instance = Singleton()[...]
>> Read the full article on www.blogs.sigristsoftware.com
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper