Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Selected Access Point from windows forms listbox #30

Closed
yatt-ze opened this issue Apr 26, 2017 · 1 comment
Closed

Getting Selected Access Point from windows forms listbox #30

yatt-ze opened this issue Apr 26, 2017 · 1 comment

Comments

@yatt-ze
Copy link

yatt-ze commented Apr 26, 2017

when trying to get the selected access point for the user to connect to I tried using
AccessPoint selectedAP = listBox1.SelectedItem;
and I get the error:
error CS0266: Cannot implicitly convert type 'object' to 'SimpleWifi.AccessPoint'. An explicit conversion exists (are you missing a cast?)
is there any way to fix this??

@yatt-ze yatt-ze closed this as completed Apr 26, 2017
@yatt-ze
Copy link
Author

yatt-ze commented Apr 26, 2017

fixed it
var accessPoints = List(); AccessPoint selectedAP = null; foreach (AccessPoint ap in accessPoints) { if (ap.Name == listBox1.SelectedItem.ToString()) { selectedAP = ap; } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant