PrivateObject.GetField Method (String)
Gets a value from a named field, based on the name.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Function GetField ( _
name As String _
) As Object
public Object GetField(
string name
)
public:
Object^ GetField(
String^ name
)
member GetField :
name:string -> Object
public function GetField(
name : String
) : Object
Parameters
- name
Type: System.String
The name of the private field to get.
Return Value
Type: System.Object
The value set for the name field.
Exceptions
Exception | Condition |
---|---|
ArgumentException | name is nulla null reference (Nothing in Visual Basic) or empty. |
.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.