什么是属性中的"property:"

Yur*_*riy 11 c# attributes properties

你能解释一下"财产:"这个词是什么意思吗?

[property: NotifyParentProperty( true )]
public string Filename
{
  get;
  set;
}
Run Code Online (Sandbox Code Playgroud)

Bot*_*000 7

这意味着属性应用于属性.
在这种特殊情况下,它是多余的,可以放弃.

这种元素定义了属性目标,当目标可能不明确时(例如目标method目标),它们最有用return.Visual Studio还使用目标生成属性assembly,AssemblyInfo.cs其中目标是许多项目模板的一部分.

更多信息和可能的属性目标列表:
消除属性目标(MSDN)的歧义