NeedsAccessToLocalsAttribute 类 | |
This class is used to mark methods, properties etc. that want access to Local Variables by name.
继承层次 Object
Attribute
NeedsAccessToLocalsAttribute
命名空间:
XSharp.Internal
程序集:
XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法 [AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property)]
SEALED CLASS NeedsAccessToLocalsAttribute INHERIT Attribute
[AttributeUsageAttribute(AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property)]
public sealed class NeedsAccessToLocalsAttribute : Attribute
查看代码NeedsAccessToLocalsAttribute 类型公开以下成员。
构造函数 属性 备注
In FoxPro several built-in functions have access to locals "by name". We can't do that because it violates
the normal rules of encapsulation. However we can "emulate" this behavior by adding this attribute to a function or
method that wants access to locals.
At runtime we will then populate a table in the runtime with the names and values of local variables
And we can access this table with the normal MemVarGet() and MemVarPut() functions.
参见