SetStaticFieldOrProperty Method (String, BindingFlags, Object)

PrivateType.SetStaticFieldOrProperty Method (String, BindingFlags, Object)

 

Sets a static field or property contained in the wrapped type.

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

public void SetStaticFieldOrProperty(
	string name,
	BindingFlags bindingFlags,
	object value
)

Parameters

name
Type: System.String

The name of the static field or property.

invokeAttr

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 SetField, SetProperty, and Static.

value
Type: System.Object

The value to set to the static field or property.

System_CAPS_importantImportant

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

Return to top
Show:
© 2016 Microsoft