C#을 C++로 변환

.NET Framework를 완벽하게 지원하여 엔터프라이즈급 C# 라이브러리 또는 콘솔 애플리케이션을 C++로 번역하세요. 결과물인 C++ 라이브러리는 Linux, MacOS, Windows를 비롯한 다양한 운영 체제와 호환되므로 애플리케이션을 여러 플랫폼에 배포할 수 있습니다. 최소한의 수작업으로 수백만 줄의 코드를 한 번에 번역할 수 있습니다.
서비스 요청

CodePorting.Translator Cs2Cpp는 트랜스파일러 애플리케이션입니다

API나 코드 문서를 변경하지 않고도 두 언어에 대해 동일한 버전의 소프트웨어를 출시하기 위해 지속적으로 개선되는 C# 코드를 C++로 자동 번역하도록 설정하는 데 사용할 수 있습니다. 또한 .NET 지원이 없거나 문제가 있는 플랫폼에 C# 애플리케이션 및 라이브러리를 제공하는 데에도 도움이 될 수 있습니다.

강력한 기능으로 C# 코드를 손쉽게 변환하세요

CodePorting.Translator Cs2Cpp는 소스 코드 대 소스 코드 트랜스파일러 앱으로, 내부 클래스와 루틴을 원본 C# 코드에서 구현된 것과 동일한 방식으로 재현할 수 있습니다. 또한 C# 프로젝트를 C++로 번역한 후에는 지원되는 모든 대상 플랫폼에 맞게 빌드할 수 있습니다.
public void EnclosedWhile(int max1, int max2)
{
	int number1 = 0;
	while (number1 < max1)
	{
		int number2 = 0;
		while (number2 < max2)
		{
			Console.WriteLine(number1 + number2);
			++number2;
		}
		++number1;
	}
}
void WhileStatements::EnclosedWhile(int32_t max1, int32_t max2)
{
	int32_t number1 = 0;
	while (number1 < max1)
	{
		int32_t number2 = 0;
		while (number2 < max2)
		{
			System::Console::WriteLine(number1 + number2);
			++number2;
		}
		++number1;
	}
}
public class ClassProperties
{
	public string PublicProperty
	{
		get { return mPublicPropertyField; }
		set { mPublicPropertyField = value; }
	}

	private string mPublicPropertyField;
}

class ClassProperties : public System::Object
{
    public:
        System::String get_PublicProperty();
        void set_PublicProperty(System::String value);

        ClassProperties();

    private:
        System::String mPublicPropertyField;
};
public void BreakEnclosedForeach(int[][] values, int max)
{
	foreach (int[] row in values)
	{
		if (row.Length == 0)
		{
			break;
		}

		foreach (int value in row)
		{
			Console.WriteLine(value);
			if (value > max)
			{
				break;
			}
		}
	}
}

void BreakStatements::BreakEnclosedForeach(System::ArrayPtr<System::ArrayPtr<int32_t>> values, int32_t max)
{
    for (System::ArrayPtr<System::ArrayPtr> row : values)
    {
        if (row->get_Length() == 0)
        {
            break;
        }

        for (int32_t value : row)
        {
            System::Console::WriteLine(value);
            if (value > max)
            {
                break;
            }
        }
    }
}
using System.Threading;

class LambdaTest
{
    public void TestMPMM_1()
    {
        var a = 0;
        new Thread(() =>
        {
            var b = a;
        });
    }
}
#include <system/threading/thread.h>
#include <system/details/lambda_capture_holder.h>
#include <functional>
#include <cstdint>

void LambdaTest::TestMPMM_1()
{
    System::Details::LambdaCaptureHolder<int32_t> _lch_a = 0;
    int32_t &a = _lch_a.GetCapture();
    System::MakeObject<System::Threading::Thread>(static_cast<System::Threading::ThreadStart>(static_cast<std::function<void()>>([_lch_a, &a]() -> void
    {
        int32_t b = a;
    })).template AddHeldVariable<System::Threading::ThreadStart>("a", a));
}
csharp converter feature
외부 종속성
번역에 사용할 수 없는 종속성 대신 수동으로 작성한 코드를 대체합니다.
csharp converter feature
API 보존
C# 코드에 사용된 언어별 구문은 가장 일치하는 C++ 구문으로 변환됩니다.
csharp converter feature
메모리 제어
사용되지 않는 객체를 파괴하고 루프 참조를 중단하기 위해 번역된 코드에서 약하거나 공유된 포인터를 제어합니다.

번역가 지원 라이브러리

CodePorting.Translator Cs2Cpp는 C# 코드를 C++로 번역할 수 있는 프레임워크입니다. 결과 코드는 원래 .NET 코드와 동일한 API를 제공하며, 번역된 비관리형 C++ 환경에서 실행할 수 있습니다.

번역기 지원 라이브러리는 .NET 클래스와 일부 서비스 코드를 대체하는 C++ 라이브러리입니다. 번역된 코드는 궁극적으로 이 구성 요소에 종속됩니다. 이 라이브러리는 .NET 핵심 기능과 함께 System.Net, System.Drawing, System.XML, System.Security 및 기타 하위 시스템을 지원합니다. 번역기 지원 라이브러리는 컴파일된 제품에 포함됩니다. 번역된 C++ 코드를 배포하려는 경우 번역기 지원 라이브러리 NuGet 패키지에 대한 종속성을 포함할 것을 권장합니다.
c sharp to cpp conversion scheme

C++로 성공적으로 변환된 C# 제품의 예

관련 기사

지원 및 학습 리소스