【发布时间】:2010-08-21 22:15:33
【问题描述】:
如何在基于 Visual-C++ 的 .net DLL 中接收来自 C# 的字符串?
在 C++ 中(使用 clr)我有这个代码:
#include "stdafx.h"
##include <Windows.h>
#include <string>
#include <windows.h>
namespace NSST
{
public ref class Wrapper
{
public:
Wrapper() {}
static void init_1(std::string a, std::string b){}
static void init_2(){}
};
};
但在 .net C# 中,我只看到一个函数 init_2。如何使init_1 在.net 中可见?
【问题讨论】:
标签: c# .net c++ visual-c++ dll