Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

About consistency

0 views
Skip to first unread message

John Smith

unread,
Mar 26, 2004, 2:05:50 AM3/26/04
to
About consistency

ListBox/ComboBox.SelectedIndex returns an Integer
why does ListBox/ComboBox.SelectedIndices return a SelectedIndexCollection?
should return an Integer()

you can use ListBox/ComboBox.Items.AddRange(many types)
why does ListBox/ComboBox.SelectedItems return only a
SelectedObjectCollection?
should return the type used to set the items
is it easier to set items as objects and write your own sort method just
to show the DisplayNames?

Most Controls have an AllowDrop property, where is the AllowDrag property?

hmmm, you can add a few more :)


I love VB, simple and useful!
Microsoft can do it!
Keep VB attached to the operating system and improve it, don't change it!

Cor

unread,
Mar 26, 2004, 2:59:58 AM3/26/04
to
Hi John,

DotNet is one big inherited box.

Most controls as listbox and combobox are direct or indirect inherited from
controls (forms is also).

Therefore, to understand it all down you have to start at the parent class.

However, it uses also polymorphism. When you will look at the textbox, you
will see that although the most derived controls use text the standard
property the textbox uses an overridden property.

What you will see as result of this is very consistent behaviour, but like
in nature, a dog and cat have differences.

I hope this makes it clearer,

Cor

John Smith

unread,
Mar 29, 2004, 6:02:35 AM3/29/04
to
Let Add one more

Split("",",") returns an array with one element = ""
Should return Nothing

0 new messages