public PlcPropertyByteArray(PropertyInfo propertyInfo, int size) { PropertyType = new PlcByteArray(size); Getter = (Func <TClass, byte[]>)Delegate.CreateDelegate(typeof(Func <TClass, byte[]>), propertyInfo.GetMethod); Setter = (Action <TClass, byte[]>)Delegate.CreateDelegate(typeof(Action <TClass, byte[]>), propertyInfo.SetMethod); }