MethodBase.IsPrivate 属性

获取一个值,该值指示此成员是否是私有的。

**命名空间:**System.Reflection
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public ReadOnly Property IsPrivate As Boolean
用法
Dim instance As MethodBase
Dim value As Boolean

value = instance.IsPrivate
public bool IsPrivate { get; }
public:
virtual property bool IsPrivate {
    bool get () sealed;
}
/** @property */
public final boolean get_IsPrivate ()
public final function get IsPrivate () : boolean

属性值

如果对此方法的访问只限于该类本身的其他成员,则为 true;否则为 false

备注

如果类型成员具有 Private 级可见性,则可以从同一类中的任何成员调用它,但不能从其他类型调用它。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

MethodBase 类
MethodBase 成员
System.Reflection 命名空间
Boolean