Jump to content

code not working

chimado

Well, there's a missing parenthesis after To.String. It should read:
 

(comboBox1.ToString())

Also, please use code tags.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

ToString is more like dump function to convert whole object to string so you can debug your app and print out the object. And since you did post the least information you could post, then we can just probably guess, and my guess is that you trying to pass that string output to a function that doesn't accept string as an argument. But this is just a guess, it may be something else.

 

You probably want to read SelectedIndex and then refer by this index to Items of the combobox, or read Text. You may also be fine jus with index, if items are always in same order. Idk, you actually didn't tell what you want to do.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×