mark c

mark c

  • NA
  • 14
  • 48.6k

Two errors I need help with.

Jan 17 2011 10:36 PM
Error1:
  foreach (System.Windows.Forms.Button b in this.Controls)
{
b.Image = WindowsApp1.Properties.Resources.BtnImg;
}
Unable to cast object of type 'System.Windows.Forms.GroupBox' to type 'System.Windows.Forms.Button'.

Error2:
String temp = ListBox1.Items[0].ToString

Cannot convert method group 'ToString' to non-delegate type 'string'. Did you intend to invoke the method?

Answers (3)