C # study again

Source: Internet
Author: User
I have learned the attention before, but I have not really understood the content. After I re-learn it today, I have a clear understanding of the attention.
Here, we only need to adjust the definition and usage of attention, so we don't need to use attention. (If any, please note)

/*
* Attention uses two records similar to the number of functions, and a get value is used for attention ), another parameter is used to set the property ).
* These two parameters are also called the parameter reader. The get and set parameters are used to define the parameter differences.
* You can ignore one of these features to build only-or only-experimental (only get optimized for only experimental, only set optimized for only experimental)
* Get response must have a response type. The response of a ticket is generally related to a private field to control the response to this field. At this time, get response can directly return the value of this field.
* The set function records a Value Field in a similar way. This parameter can be used to reference the reserved value provided by references.
* Define a typical word.
*/

//Filed used by property
Private IntMyint;


// Property

// Public intercept; INT: Type myintpop: Generic Name
Public   Int Myintprop
{
// Renewal Value
Get
{
Return Myint;
}
// Inbound Value
Set
{
// Assign a value to a field. The value of this field is a variable value.

Myint = Value;
}
}

//The process of using the compile time

// At this time, attackers will use the 'authorization' get token to obtain the 'authorization' value.
Int Ivalue = This . Myintprop;
// At this time, the reserved set signature is used to modify the reserved value.
This . Myintprop = Value ;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.