Why, since the version of Visual Studio 2015 every time I command to generate an attribute in a class, is it generating with set
internal
?
In previous versions VS generated as public
.
Why, since the version of Visual Studio 2015 every time I command to generate an attribute in a class, is it generating with set
internal
?
In previous versions VS generated as public
.
It depends on where you want to create this property, and also the naming format.
public class Teste
{
public Teste()
{
minhaProriedade = 1; // private readonly
OutraPropriedade = true; // public
}
public Metodo()
{
MaisUmaProp = "OK"; // como private, internal ou protected, se tiver herança
}
}
And so it goes, depending on where the creation of the property will start, Visual Studio will try to guess its level of security.