Kanhialal kk

Kanhialal kk

  • NA
  • 234
  • 339.3k

error in Hashtable methods

Apr 20 2011 2:01 AM
Hi...
I am using hashtable as below

buffer=new Hashtable();
if (table.Rows.Count > 0)
                    {
                       if (this.buffer.get_Item(this.Flex.Row) == null)
                        {
                            this.buff = (byte[])table.Rows[0]["Picture"];
                            this.buffer.set_Item(this.Flex.Row, this.buff);
                        }
                        this.lblpic.Visible = false;
                        this.buff = (byte[])this.buffer.get_Item(this.Flex.Row);
                        MemoryStream stream = new MemoryStream(this.buff, true);
                        stream.Write(this.buff, 0, this.buff.Length);
                        Bitmap bitmap = new Bitmap((Stream)stream);
                        this.pictureBox1.Image = bitmap;
                        stream.Flush();
                        stream.Close();
                    }

get_Item();
set_Item();
methods does not works and error is coming  as below.. for get_item method
error...!
System.Collections.Hashtable.this[object].get': cannot explicitly call operator or accessor
error2 for set_item method
System.Collections.Hashtable.this[object].set': cannot explicitly call operator or accessor   

any help me... please

Answers (5)