public String Authenticate(String configUrl, out String tokenId)
この
__authenticator->Authenticate(
gcnew System::String(hostUrl),
gcnew System::String(temp)
);
あるで文字列を渡すパラメータを作成し、それを得ましたAuthenticateの署名)〜
__authenticator.Authenticate(
new String(hostUrl),
out new String(temp)
);
が、C#であなたがする必要がありますので、あなたは...変数、フィールドにout new Something
、あなたができる唯一のout
を行うことはできませんC#で:
String temp2 = new String(temp);
__authenticator.Authenticate(
new String(hostUrl),
out temp2
);
と、パラメータがであることを考慮out
することができます:
String temp2;
__authenticator.Authenticate(
new String(hostUrl),
out temp2
);
さて、C++/CLIで、あなたが持っている
System::String^ temp2 = gcnew System::String(temp);
__authenticator->Authenticate(
gcnew System::String(hostUrl),
temp2
);
または、
// agnostic of the out vs ref
System::String^ temp2 = nullptr;
// or knowing that temp2 will be used as out, so its value is irrelevant
// System::String^ temp2;
__authenticator->Authenticate(
gcnew System::String(hostUrl),
temp2
);
は 'http://stackoverflow.com/見る(ないC++/CLIコンパイラによって、
ref
とout
の違いは唯一のC#コンパイラによって確認された何かであることに注意してください)temp2
がout
であることを知っていますa/187577/613130' ...しかし、ここで何が問題なのですか? 'temp'と' hostUrl'は何ですか?あなたは何を期待していますか? – xanatos