.NET Version: 3.5
Ok, I recieve an error (System.Invalid CastException was unhandled. Message="Unable to cast object of type 'System.Windows .Forms.Control[]' to type 'System.Windows .Forms.Label'." ) when trying to get Text from a Label referenced by a dynamicly built string.
Here's my situation; I have an array of 250 labels named l1 - l250. What I want to do is loop through them using this while statement:
...
User Profile
Collapse
-
Promedeus started a topic InvalidCastException when getting Text from a Label referenced by dynamic stringin C SharpInvalidCastException when getting Text from a Label referenced by dynamic string
-
Thanks, I'll give it a try! -
Parse a textBox to Double not working properly. Very strange.
Hello,
I am incredibly puzzled.
I have made a small, fairly simple calculator for specific purposes. I can run this fine on my computer. But when I try to run it on a target computer (from Norway) I get an error that puzzles me.
Here's the strange behavoir:
This piece of code works fine on both computers, and...Code:textBox.Text = "1"; double result = double.Parse(textBox.Text) * .15;
No activity results to display
Show More
Leave a comment: