NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FieldInfo.IsPrivate

Retrieves a value indicating whether the field is private.

[Visual Basic]
Public ReadOnly Property IsPrivate As Boolean
[C#]
public bool IsPrivate {get;}
[C++]
public: __property bool get_IsPrivate();
[JScript]
public function get IsPrivate() : Boolean;

Property Value

Read-only. true if the field is private; otherwise; false.

Remarks

Private fields are accessible only from member functions and subclasses.

The IsPrivate property is set when the FieldAttributes.Private attribute is set.

To get the IsPrivate property, first get the class Type. From the Type, get the FieldInfo. From the FieldInfo, get the IsPrivate. If the property is other than public, it is protected and cannot be readily accessed. To access a non public property, in the GetField method, set the BindingFlags to NonPublic.

Example

See Also

FieldInfo Class | FieldInfo Members | System.Reflection Namespace