戻り値(int)をmethodInfo.invokeから取得するにはどうすればよいですか? 私は、メソッドを呼び出すために文字列変数を使用するということは難しいです。 チェック以下の例: if (Convert.ToBoolean(getParameterFromXML("issue", k, 1)) == true)
{
m = k + 1;
MethodInfo met
Invoke()にTargetExceptionをスローする際に問題があります。 public Controller(SystemUI ui, System system)
{
UI = ui;
System = system;
UI.CommandEntered += ParseCommand;
Commands = new Dictionary<s
IPカメラからビデオを表示するプログラムを作成しようとしています。 これは私のコードです: using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using Syste
と同じクラスの別のメソッドの名前を取得することは可能ですか?手書きの文字列を使用していますか? class MyClass {
private void doThis()
{
// Wanted something like this
print(otherMethod.name.ToString());
}
private vo
Funcを直接呼び出して呼び出す方法と、それを呼び出す方法の違いについては興味があります。違いはありますか?最初の構文的な砂糖で、とにかくInvoke()を呼び出しますか? public T DoWork<T>(Func<T> method)
{
return (T)method.Invoke();
}
public T DoWork<T>(Func<T> method)
{