c# - Does Resharper contain a Convert to Direct Cast refactoring? -
i have code on code base:
multilist ml = this.criterialist.itembyname(sc_sam_categories) multilist;
i want convert direct cast:
multilist ml = (multilist) this.criterialist.itembyname(sc_sam_categories);
with possible bonus of replacing multilist ml
var ml
.
does resharper contain refactoring this, perhaps via addin? if so, how turn on?
yes, can compose own refactorings through custom patterns : see link
in case :
search pattern :
$type$ $id$ = $expr$ $type$;
replace pattern :
var $id$ = ($type$) $expr$;
you can make appear quick-fix.
Comments
Post a Comment