Type mismatch: cannot convert from List<SelectOption<Integer>> to List<SelectOption<String>>?

Here's code:

List<SelectOption<String>> validMemberList = ValidDataUtil.getValidMemberType();

Can anyone tell me :

How can convert the List<SelectOption<Integer>> to List<SelectOption<String>> ?

Answers


How can convert the List<SelectOption<Integer>> to List<SelectOption<String>> ?

You can't, directly. You can loop through the first and use toString on each of the integers to build the second, though.


How can convert the List<SelectOption<Integer>> to List<SelectOption<String>> ?

You can't, because both are two different data types. Iterate the list and convert each element with toString() method.


Need Your Help

Good Code Spell Checker for Visual Studio 2010

visual-studio-2010 spell-checking vsx

Are there any good (preferably free) solutions out there?

How to convert simple Actionscript 1 to Actionscript 3

flash actionscript

I sometimes have to edit an old .fla file. The problem is that I updated to a newer version of Flash and now I can't export .swf's with actionscript1 anymore. The code is very simple, it just shows...