public void Set(string name, long value, SizeUnit unit) { var size = new Size(value, unit); if (AllProperties.TryGetValue(name, out PropertyInfo property)) { property.SetValue(this, size); return; } Other[name] = size; }