auto typeof() feature request

Thread is closed for posting
2 posts, 0 answers
  1. MiddleTommy
    MiddleTommy avatar
    163 posts
    Member since:
    Nov 2009

    Posted 30 Apr 2011 Link to this post

    It would be nice to have a way for JustCode to automatically translate a type into a typeof();

    if you are calling a method with a type for a parameter.
    public void RegisterType(Type type){...}

    then in your code you type


    Justcode could automatically change that to


    provided it also checks for variable names that are not the same name as the type. If So offer a refactoring to change it to typeof...

    What do you think?

  2. Svetlozar
    Svetlozar avatar
    294 posts

    Posted 09 May 2011 Link to this post

    Hello MiddleTommy,

    Thank you for your feedback.

    The way our analysis is built makes it hard to create a reasonable error + quick fix for RegisterType(string);, because we currently don't recover the keyword "string" to an expression(and therefore to an argument of wrong type).

    We will consider changing the recovery in the future to create a refactoring for that

    Kind regards,
    Svetlozar Angelov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top