次のバイト配列がある場合:
byte[] someArray = new byte { 0, 1, 2 };
リフレクションを介してクラスのインスタンスにコピーしたいのですが、どうすればできますか?
// Inside a class method
PropertyInfo property = this.GetType().GetProperty("propertyName");
if(property.PropertyType == typeof(System.Byte[]))
{
property.SetValue(this, ???, ???); // How to set an array?
}