The simplest way to see what Managed Extensibility Framework can do is to build a simple MEF application. In this example, you build a very simple calculator named SimpleCalculator. The goal of SimpleCalculator is to create a console application that accepts basic arithmetic commands, in the form '5+3' or '6-2', and returns the correct answers. Using MEF, you will be able to add new operators without changing the application code.
Visual Basic.NET Language Creating a simple Calculator to get familiar with the interface and code. This is the snippet Simple Calculator on FreeVBCode. The FreeVBCode site provides free Visual Basic code, examples, snippets, and articles on a variety of other topics as well. A VB.Net Calculator Program Before VB.Net arrived in 2002, the highly popular Visual Basic 6 provided programmers with the ability to create what were known as control arrays.In real terms, a control array was actually a collection of controls that could be programmed as an array thanks to some fairly complex behind-the-scenes code provided by Microsoft. To design the interface, we just to need to modify the interface of the basic calculator that we have created earlier using Visual Basic 6. In this calculator, we have added five more buttons, they are Sin, Cos, Tan, Log and Ln. The common trigonometric functions in Visual Basic 6 are Sin, Cos, Tan and Atn. New project with blank form (Violet Mabe) Open Visual Basic 6, and select 'Standard EXE' from the.
NOTE: The purpose of SimpleCalculator is to demonstrate the concepts and syntax of MEF, rather than to necessarily provide a realistic scenario for its use. Many of the applications that would benefit most from the power of MEF are more complex than SimpleCalculator. For more extensive examples, see Managed Extensibility Framework samples.


Building the sample
Visual Basic Calculator Code
To download and run the sample, follow these steps:
Download and unzip the sample.
In Visual Studio 2019 or later:
On the menu bar, choose File > Open > Project/Solution.
Navigate to the folder that holds the unzipped sample code, and open the solution (.sln) file.
Choose the F5 key, or Ctrl+F5 keys, to run the project.
From the command line:
Navigate to the folder that holds the unzipped sample code.
At the command line, type
dotnet run.

Calculator Code For Visual Basic
More information

