Files
2021-02-15 20:28:10 -05:00

729 B

MyTestLib

Simple C# library

Getting Started

Build the library. Debug or release depends on your intent.

dotnet build

Using the library is simple. Include the path to the dll in your csproj file.

<ItemGroup>
  <Reference Include="MyTestLib">
    <HintPath>path/to/MyTestLib.dll</HintPath>
  </Reference>
</ItemGroup>

Add the using declarative

using System;
using System.Collections.Generic;
...

using MyTestLib;

...


public void SomeFunction()
{
    var myList = new List<double>()
    {
        1, 1, 2, 3, 5, 8, 13
    };

    var someLib = new MyTestLib();
    // All the values of myList are summed and stored in the sum variable
    var sum = someLib.SumListValues(myList);
}