I tried to assign byte to RGB color but I got this error in VS2010 "Property or indexer 'System.Drawing.Color.R' cannot be assigned to -- it is 开发者_如何转开发read only" so how can I assign byte to RGB color ?
There is no way to assign this property. Instead you should create new Color
instance:
Color oldColor;
byte r;
Color newColor = Color.FromArgb(oldColor.A, r, oldColor.G, oldColor.B);
精彩评论