This article is a mirror article of machine translation, please click here to jump to the original article.

View: 16116|Reply: 0

[Communication] { get; } in C#; set; What does it mean and how to use it?

[Copy link]
Posted on 1/28/2019 2:50:30 PM | | |
This post was last edited by Summer on 2019-1-28 14:51

For example, the attribute xxx can be obtained or set.
If it is set only, it can only be set, and vice versa.
Older versions of the .NET framework for properties cannot be omitted, they must be done as follows:

The current version can be omitted, requiring only:
public AdminID{get; set; } It has the same meaning, which is to define the attribute adminID of the AdminID class





Previous:The use of angle brackets in c#, such as List<int>
Next:Unique Key constraints for multiple columns in the Entity Framework (Unique Key constr ...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com