Stay With us
3 new comments

beginner
new

Help & Settings
About
Help
Tips

Error in image Converter in c# windows form

how can i solve this problem..

private void button1_Click(object sender, EventArgs e)
{
    itemBindingSource.EndEdit();

    string icode = icodeTextEdit.Text;
    string idesc = idescTextEdit.Text;
    ImageConverter _imageConverter = new ImageConverter();
    byte[] img = (byte[])_imageConverter.ConvertTo(imgPictureedit, typeof(byte[]));
}

Here is the error given by visual studio

Unable to cast object of type 'DevExpress.XtraEditors.PictureEdit' to type 'System.Drawing.Image'

Zhuoer Dong
10 Points

(1) Replies

Please login or register to Comment or Answer