# .NET Framework (C#) Samples

> The C# SDK samples are console applications that demonstrate specific eXtremeDB features or programming techniques. They can be built in batch mode or individually and can be run from a console window or with the Visual Studio debugger (recommended).

> ## Batch build

> The Windows package you installed is for the specific version of Visual Studio requested in the purchase order. To build and run the C# (.NET Framework) SDK samples:

> > 1. Load the solution file `samples.dotnet.sln` from the installation root directory into Visual Studio,

> > 2. From the menu option bar choose BUILD -> Batch Build,

> > 3. Click on the "Build" check box for all "Debug" or "Release" samples to be built. (Note that if you click the button "Select All" this will build both "Debug" and "Release" versions of each sample and only the last version built will remain in the `target/bin` directory. So it won't be clear whether that executable is built with "Debug" or "Release" libraries!)

> > 4. Open a console window and navigate to the installation `target/bin` directory

> > 5. Select and run a sample executable, for example:

> >         C:\eXtremeDB\win64vs2013\target\bin>BTree.exe
> >         Sample 'BTree' demonstrates search operations with tree indexes.
> >         All objects             : (1) (2) (2) (3) (3) (3) (4) (4) (5) (5) (5)
> >         Objects with value >  3 : (4) (4) (5) (5) (5)
> >         Objects with value >= 3 : (3) (3) (3) (4) (4) (5) (5) (5)
> >         Objects with value == 3 : (3) (3) (3)
> >         Objects with value == 3 (stricted search) : (3) (3) (3)
> >         Objects with value <= 3 : (3) (3) (3) (2) (2) (1)
> >         Objects with value <  3 : (2) (2) (1)

> >         Press enter to finish

> ## Build and run individual samples

> It is recommended to run samples in the Visual Studio debugger and step through the code to understand the implementation. To run a sample in the debugger, simply right-click on the sample project in the Solution Explorer and select the drop-down menu item Debug -> Start New Instance. Set breakpoints in appropriate places in the source code to examine the code during execution.

> Please use the links on page C# Samples for instructions for running the individual samples.