The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PrivateType.GetStaticFieldOrProperty Method (String, BindingFlags)


Gets a value of a static field or property in a wrapped type based on the name.

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

public object GetStaticFieldOrProperty(
	string name,
	BindingFlags bindingFlags


Type: System.String

The name of the static field or property to get.


A bitmask comprised of one or more BindingFlags that specifies how the search for the static field or property is conducted. The type of lookup need not be specified.

The default values are GetField, GetProperty, and Static.

Return Value

Type: System.Object

The value set for the name field or property.


This is important for Visual Basic source code because fields and properties are used the same way.

Return to top