C# using others code

Add the library to your solution

Copy the IntervalTreeLib directory into your solution directory. Then, right-click your solution, and add existing project. Point it at IntervalTreeLib.csproj in IntervalTreeLib, and click Open. That should add the IntervalTreeLib project to your solution.

Add Existing Project Screenshot

Add a reference to the library in your project

Then, in your project, add a reference to the IntervalTreeLib proejct:
– Right click the References folder, and Add Reference. Click the Projects tab, and select IntervalTreeLib.

Add Reference Screenshot

Select Project Reference Screenshot

Use the classes in your code

To use classes from the library in your source then, you need to either add:

using IntervalTreeLib;

void Foo() {
    IntervalTree<int, int> tree = new ...
}

Or, refer to them by their full name:

IntervalTreeLib.IntervalTree<int, int> tree = new ...

Leave a Comment