New C# to C++ transpiler

Coordinator
Feb 19, 2016 at 9:32 AM
Edited Feb 19, 2016 at 7:19 PM
Hi Guys

Happy to tell that I successfully compiled CoreLib with CS2CPP program.

Hello World Example:
using System;

class X {
    public static int Main (string [] args)
    {
        Console.WriteLine ("Hello, World!");
        return 0;
    }
}
converts into 2 files
#include "CoreLib.h"
namespace test_1 { class GModuleC; }
namespace test_1 { class X; }

namespace test_1 { 
    class GModuleC
    {
    public:
        GModuleC() = default;
    };
}

namespace test_1 { 
    class X : public CoreLib::System::Object
    {
    public:
        typedef CoreLib::System::Object base;
        X();
        static int32_t Main(__array<CoreLib::System::String*>*);
    };
}
and source file
#include "test-1.h"

// Method : X.X()
test_1::X::X() : object()
{
    return;
}

// Method : X.Main(string[])
int32_t test_1::X::Main(__array<string*>* args)
{
    CoreLib::System::Console::WriteLine(L"Hello, World!"_s);
    return 0;
}

auto main() -> int32_t
{
    test_1::X::Main(nullptr);
    return 0;
}
Once hello world works I will share the source code
Coordinator
Mar 3, 2016 at 2:37 PM
Ok, so hello world is working now
Coordinator
Mar 22, 2016 at 8:45 PM
meet C# to C++ transpiler

https://github.com/ASDAlexander77/cs2cpp