.NET and SMILE.NET

<< Click to Display Table of Contents >>

Navigation:  Platforms and Wrappers >

.NET and SMILE.NET

SMILE.NET, which is compatible with .NET framework 4.x, consists of a single mixed-mode assembly named smilenet.dll. To use the library, simply add smilenet.dll as a reference in your project.

We build SMILE.NET using C++/CLI compiler in Visual Studio 2013 to create a seamless package containing both native code (the C++ SMILE library) and .NET wrapper code. This compiler enforces the use of the dynamic C++ runtime library. This means that smilenet.dll has a runtime dependency on VS2013 C++ runtime. Your Windows system is likely to have this component already installed. However, if you are getting error messages referring to missing DLLs like MSVCP120.DLL or MSVCR120.DLL, you need to download and install the "Visual C++ Redistributable Package for Visual Studio 2013" from Microsoft's website.

Your license key should be pasted into the sources of your program. We provide the keys as C# and VB.NET code.

The classes defined in SMILE.NET are located in Smile and Smile.Learning namespaces. There are two types of classes:

simple objects with public data members

wrappers for C++ objects from SMILE library

The second group of classes, which includes Smile.Network, is derived from Smile.WrappedObject and also implements .NET's IDisposable interface. Each object instance of these classes has a related C++ object, which is deallocated by the .NET object's finalizer or its IDisposable::Dispose method. You can use C#'s using statement to ensure deterministic finalization, otherwise the deallocation will be performed in the finalizer during garbage collection.

using (Network net = new Network())

{

    // use the net object in this scope

}