none
Encapsular Campo VS 2017 RRS feed

  • Pergunta

  • Olá,

    Instalei o Visual Studio 2017 hoje e estou tendo problemas para encapsular um campo de uma classe, segue abaixo um exemplo:

    vs 2017 - Novo

    private string test;

    public string Test { get => test; set => test = value; }


    vs2015 - Antigo

    private string test;

    public string Test

    {

         get

         {

             return test;

          }

         set

         {

             test = value;

          }

    }


    Se alguém poder me ajudar em como resolver isto, agradeço.

    Obrigado !


    segunda-feira, 20 de março de 2017 16:29