Skip to content

Instantly share code, notes, and snippets.

View YounesCheikh's full-sized avatar
🛌
Sleeping

Younes CHEIKH YounesCheikh

🛌
Sleeping
View GitHub Profile
@YounesCheikh
YounesCheikh / OldSchoolCliArgs.cs
Last active February 22, 2022 19:40
Very old school way to parse Command Line arguments to compare with the Cliargs.NET package
var userInputArgs = Environment.GetCommandLineArgs().Skip(1).ToArray();
if(userInputArgs.Length == 0)
{
Console.WriteLine("Missing mandatory arguments: --name");
return;
}
string name = string.Empty;
uint? age = null;
var currentKey = string.Empty;