In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Xiaobian to share with you CTS example analysis, I believe most people do not know how, so share this article for your reference, I hope you read this article after a great harvest, let us go to understand it!
CTS(common type system)
The common type system states that a type can have zero or more members, as follows:
Field:
A data variable that is part of the state of an object. Fields are distinguished by name and type
Method:
A function that performs an operation on an object, usually changing the state of the object. A method has a name, a signature, and one or more modifiers. Signature specifies the number of arguments (and their order); Parameter type: whether the method has a return value. If there is a return value, specify the return value type
Prolerty:
To the caller, attributes look like fields. But to the implementer of the type, the attribute appears to be one method (or two methods). Attributes allow input parameters and object state to be verified before accessing values, and a value to be evaluated only if necessary. Attributes also allow users of types to adopt simplified syntax. Finally, attributes allow you to create read-only or write-only fields
Event:
Events implement notification mechanisms between objects and other related objects. For example, an event provided by a button can notify other objects after the button is clicked
CTS also specifies visibility rules and access rules for members of a type, such that if a type is marked public, it can be seen and accessed by any assembly. But if marked as assembly (using the internal modifier in C#), only code in the same assembly can see and access the type, so assemblies establish visual boundaries for a type using rules laid down by CTS, and CLR enforces these rules:
private:
Members can only be accessed by other members of the same type;
protected:
Members are accessible by derived classes, regardless of whether those types are in the same assembly.
internal:
Members can be accessed by any code in the same assembly
protected internal:
Members can be accessed by derived types in any assembly, and members can be accessed by any type in the same assembly
public
Members can be accessed by any code in any assembly
The above is "CTS sample analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.