Last Updated: February 25, 2016
· alexanderbrevig

Enabling your C# methods to be CLI callable

I made a library that makes it easy to enable your static functions to be called through CLI

Easily install with NuGet using Package Manager Console:

PM> Install-Package LazyCLI

Give this class:

namespace CLI
    public static class Hello
        public static void World(string msg)
            Console.WriteLine("Hello World: " + msg);

You can call the World method using:

LazyCLI.CLI.HandleArgs(new string[] { "CLI", "Hello", "World", "This is pretty handy" });

Will print:

Hello World: This is pretty handy