PrivateType.GetStaticField Method (String, BindingFlags)
Gets a static field contained in the wrapped type.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Function GetStaticField ( _
name As String, _
bindingFlags As BindingFlags _
) As Object
public Object GetStaticField(
string name,
BindingFlags bindingFlags
)
public:
Object^ GetStaticField(
String^ name,
BindingFlags bindingFlags
)
member GetStaticField :
name:string *
bindingFlags:BindingFlags -> Object
public function GetStaticField(
name : String,
bindingFlags : BindingFlags
) : Object
Parameters
- name
Type: System.String
The name of the static field.
- bindingFlags
Type: System.Reflection.BindingFlags
Return Value
Type: System.Object
An object that represents the value of the static field.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.