In VB.Net CType(object, type)
casts an object to a specific type.
There are two ways to accomplish this in C#:
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);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…