In VB.NET in the class, you can do the following.
Public Property MyProperty As String
At this point, a getter and setter is automatically created for you, and you can refer to a variable defined by the property as such.
Me._MyProperty = "BlahBlah"
Is there an equivalent mechanism in C #?
public string MyProperty {get; set;}
By default, they are publicly accessible accessories, you can make one of them private, like this:
public string MyProperty {get; private set;}
In C #, you cannot directly reference the base variable of automatically implemented properties.
Source: https://habr.com/ru/post/1795935/More articles:Why does USR1 seem to kill Perl rather than recreate the log file? - loggingQuestion ValueInjecter - medium-trustHow to know when the installation is complete - androidUninstall the application (* .apk) after installation - androidUsing DTO in ASP.NET MVC - asp.net-mvc-2Add web browser in java application - javaconverting a vb.net code snippet to C # - c #Search all sd card for specific file - javaHow to get an updated TableModel sort table? - javaC # Split () in ListBox - splitAll Articles