C# code upload

Ported the project to C# console application.