| Customize Help

MIL with .NET overview

The MIL.NET wrapper allows you to use MIL with C# and Visual Basic in a .NET environment. Using Microsoft's Platform Invoke technology, the MIL.NET wrapper exposes the Matrox Imaging Library's functionally to .NET languages such as C# and Visual Basic. Essentially, the MIL.NET wrapper is a set of classes, structures, and delegates that exposes all the MIL functions as methods, and all the MIL constants as constants of the class.

Typically, the term function is used in reference to C/C++, and the term method is used in reference to object-oriented languages like C# and Visual Basic. However, they imply essentially the same thing; methods are simply functions defined in a class and that typically are used on objects of that class. For consistency with the rest of the MIL documentation, we use the term function throughout, regardless of the language and context being discussed.

.NET is a managed environment, which means that it has certain characteristics, such as garbage collection and the Common Language Runtime, that make it different from programming in standard C/C++. However, programming using MIL in a managed .NET environment is very similar to programming with MIL in C/C++, as long as you keep the concepts of writing managed code in mind.

Note that this chapter does not expand upon the concepts inherent to managed code, nor does it detail the syntax of C# or Visual Basic. For MIL users more familiar with C/C++, the following references are an excellent resource for programming in .NET: https://msdn.microsoft.com/en-us/vstudio/aa496123 and http://msdn.microsoft.com/en-us/library/ff361664.aspx.

For using C#: https://msdn.microsoft.com/en-us/vstudio/hh341490.

For using Visual Basic: https://msdn.microsoft.com/en-us/vstudio/hh388573.