Vlad

My feedback

  1. 87 votes
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Vlad supported this idea  · 
  2. 65 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
    Vlad commented  · 

    It would be nice if var to type conversion was available as a quick action. My main reason to wish for that is a situation when I need to move var definition out of original scope, thus removing the implicit type information. Here is an example:
    if (something)
    {
    var a = this.Foo(); // type of 'a' is implied by Foo
    }

    If I need top refactor this code to expose 'a' outside of the current scope, in most cases I have to use explicit type definition:
    SomeClass a;
    if (something)
    {
    a = this.Foo();
    }

    // use 'a' here...

    It would be very nice if there was a quick way to convert 'var' into type.

    Vlad supported this idea  · 

Feedback and Knowledge Base