Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between the access rights of C# and Flex

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "what is the difference between the access rights of C# and Flex". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Within the type, object methods are free to access any permission member.

C# and Flex have the same package and different packages

1) if inheritance exists directly in the object type of the same package, the subclass is free to access the internal,protected,public

Non-inherited internal,public

2) different packages. If inheritance exists directly in the object type, the subclass is free to access the protected,internal.

Non-inherited public

The differences between C# and Flex are described one by one.

Public

C#

All types or members

This method can be accessed by any code

Flex

Any type of object can access

Protected

C#

All members of types and embedded types

Only derived types can access the method

Flex

Can only be accessed by similar objects and subclass objects

Internal

C#

All members of types and embedded types

This method can only be accessed in the assembly that contains it

Flex

Can only be accessed by objects of the same package type and similar objects

Private

C#

All types or members

This method can only be accessed in the type to which it belongs

Flex

Can only be accessed by similar objects

Protected internal | | / or relationship

C#

All members of types and embedded types

This method can only be accessed in the code that contains its assembly and derived type

Flex

I don't know if it can be used at the same time.

This is the end of the content of "what is the difference between the access rights of C# and Flex". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report