最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

X ++访问修饰符 / X++ access modifiers

网络文摘 William 1809浏览 0评论

The access modifiers in X++ are now much closer to C#’s access modifiers, and behave just the same.

Who can access foo() when it is…?

Please notice

  • protected internal is the union of protected and internal. I.e. a protected internal method can still be referenced by subclasses outside the defining model.
  • The extensibility attributes (Hookable, Wrappable, Replaceable) are defaulted based on the access modifier. See the relationships here: Attributes that make methods extensible.
  • InternalUseOnlyAttribute is different from Internal.
    • InternalUseOnly is an attribute telling the compiler to warn for external invocation references. As such it can be used to signal that the method will be made internal in the future. However, adding the attribute can break consumers as COC wrappers of internalUseOnly methods will get a compiler error.
    • Internal is an access modifier, controlling the IL generated by the compiler.

转载请注明:ww12345678 的部落格 | AX Helper » X ++访问修饰符 / X++ access modifiers

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址