"Replace ArrayList with List<T>" should do more

Currently the "Replace ArrayList with List<T>" command deducts the actual type from the context and correctly e.g. replaces "ArrayList" with "List]]>".

What it currently omits is to convert things like this:

return (string[])result.ToArray( typeof( string ) );

to something like this:

return result.ToArray();

Since the signature of the ToArray() function changes from ArrayList to List. My suggestion is to rewrite such function calls and casts, too, when executing the "Replace ArrayList with List]]>" command.

Thanks
Uwe

2 comments
Comment actions Permalink

Hello Uwe,

I think we've already noticed this problem:
http://www.jetbrains.net/jira/browse/RSRP-44957

Anyway, thanks for the feedback!


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


Currently the "Replace ArrayList with List<T>" command deducts
the actual type from the context and correctly e.g. replaces
"ArrayList" with "List<string>".

What it currently omits is to convert things like this:

return (string[])result.ToArray( typeof( string ) );

to something like this:

return result.ToArray();

Since the signature of the ToArray() function changes from ArrayList
to List<T>.

My suggestion is to rewrite such function calls and casts, too, when
executing the "Replace ArrayList with List<T>" command.

Thanks
Uwe



0
Comment actions Permalink

Great! Thank you for your feedback.

0

Please sign in to leave a comment.