developer 0

developer 0

  • NA
  • 8
  • 0

CheckedListBox Problems

Sep 2 2004 5:31 PM
I am trying to cast the CheckedListBox.CheckedItems[i] to a struct. Here is some of my code. string name = ((customer)checkedListBox1.CheckedItems[i]).name; customer is defined as follows: private struct customer { public string number; public string name; public override string ToString() { return this.number + "\t-- " + this.name; } } The compile tells me that it is an invalid cast.