Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Ms says the listbox.SelectedItems returns a SelectedObjectCollection but this does not work:

 

SelectedObjectCollection x= this.listBox.SelectedItems;

 

What am I doing wrong? The compiler does not know what a SelectedObjectCollection is.

C#
Posted

That works but it did not show up in the context menu as an auto complete. Even when I use System.Windows.Forms.ListBox it does not show up.

 

Also, I cannot use x.Length to reference each object in the collection and there is no context menu at all when I press x then a dot. Do I need a reference or something?

C#

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...