We can directly read an image file and load it into a Bitmap object as below.
Bitmap myBmpObj = Bitmap.FromFile(strPath);
We can also set Image path during the Initilization of Bitmap Object. Code as given below.
Bitmap loBMP = new Bitmap(strPath);
Asked In: Many Interviews |