From 53e54c4998cf70c348ee0a3e70673416a5d5c336 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 15 Feb 2021 20:28:10 -0500 Subject: [PATCH] Initial Commit --- MyTestClass.cs | 17 +++++++++++++++++ MyTestLib.csproj | 7 +++++++ README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 MyTestClass.cs create mode 100644 MyTestLib.csproj create mode 100644 README.md diff --git a/MyTestClass.cs b/MyTestClass.cs new file mode 100644 index 0000000..021b519 --- /dev/null +++ b/MyTestClass.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using System.Linq; + +namespace MyTestLib +{ + // Test class with a single method + public class MyTestClass + { + // Returns the sum of all the values in the list + #region Methods + public double SumListValues(List values) + { + return values.Sum(); + } + #endregion + } +} diff --git a/MyTestLib.csproj b/MyTestLib.csproj new file mode 100644 index 0000000..01ca256 --- /dev/null +++ b/MyTestLib.csproj @@ -0,0 +1,7 @@ + + + + netcoreapp3.1 + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..defb454 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# MyTestLib + +Simple C# library + + +## Getting Started + +Build the library. Debug or release depends on your intent. + +```BASH +dotnet build +``` + +Using the library is simple. Include the path to the dll in your csproj file. + +```XML + + + path/to/MyTestLib.dll + + +``` + +Add the using declarative + +```C# +using System; +using System.Collections.Generic; +... + +using MyTestLib; + +... + + +public void SomeFunction() +{ + var myList = new List() + { + 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); +} +``` \ No newline at end of file