In VB.Net CType(object, type) , an object is transferred to a specific type.
In C #, you can do two ways:
Bitmap image = pbImageHolder.Image as Bitmap; image.SetPixel(curPoint.X, curPoint.Y, Color.Purple);
or
Bitmap image = (Bitmap)(pbImageHolder.Image); image.SetPixel(curPoint.X, curPoint.Y, Color.Purple);
Dennis traub
source share