开发者

Is there a built in .net string/double object for combo boxes?

开发者 https://www.devze.com 2023-04-12 08:53 出处:网络
When adding items to a ComboBox I know that I could simply define some object and modify .ToString()

When adding items to a ComboBox I know that I could simply define some object and modify .ToString()

Is there a built-in object that already does this on a double/string combination?

That is:

I know that I can do this:

 myCombo.Items.Add(New MyItem(myString,myDouble));

Is there a built-in type such that I can do this:

myCombo.Items.Add(New SomeBuiltInType(myString,myDouble));

All I want is to display myString in the box and be able to read myDouble from t开发者_如何学编程he selected item... or some combination of myString and myDouble is also fine.


Use a Dictionary since each entry is a KeyValuePair.


No. There isn't one that you can use.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号