c# - 什么是 C# 中的内部设置属性?

标签 c#

我刚刚遇到了一个对我来说未知的 C# 概念。 谁能告诉我内部设置属性的用途是什么? 它的用途是什么? 我知道内部关键字用于在程序集中工作。

最佳答案

如果您有一个带有内部设置访问器(和公共(public)获取访问器)的属性,这意味着程序集中的代码可以读取(获取)和写入(设置)该属性,但其他代码只能读取它。

您可以通过阅读有关 internal access modifier 的信息得出上述信息。 , public access modifierproperties .

此外,您还可以阅读有关 Restricting Accessor Accessibility 的信息.

关于c# - 什么是 C# 中的内部设置属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7187821/

相关文章:

c# - Fluent NHibernate 自动映射 : Alter DateTime to Timestamp

c# - Xamarin.iOS.dll & GalaSoft.MvvmLight.Platform.dll 被引用

c# - Visual Studio C# 2008 : Code Folding Problem when Typing

c# - 通过 M-V-MV 设计模式绑定(bind) MouseDoubleClick 的问题

c# - 代码运行时的 ASP.NET 应用程序日志/进度条

c# - 尽管更改分辨率,视频捕获输出始终为 320x240

c# - 使用 Docusign API 使用 c# sdk 将多个文档添加到信封

c# - 从java到c#的base64编码和解码问题

c# - Unity 中出现此错误 "Download over http ,please consider updating to https"的任何永久解决方案?

c# - Foreach 上 IEnumerable<> 与 if 条件