PostSharp4.3//API Reference/Post­Sharp.​Aspects Namespace/Location­Binding­Extensions Class/Location­Binding­Extensions Methods/Location­Binding­Extensions.​Set­Value Method/Location­Binding­Extensions.​Set­Value(T) Method (ILocation­Binding(T), Object, T)
LocationBindingExtensions.SetValue<T> Method (ILocationBinding<T>, Object, T)
Sets the value of a field or property.

Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.48.0 (4.3.48.0)
Syntax
C#
public static void SetValue<T>(
	this ILocationBinding<T> locationBinding,
	Object instance,
	T value
)

Parameters

locationBinding
Type: PostSharp.Aspects.ILocationBinding<T>
The binding for the field or property.
instance
Type: System.Object
The instance for which the field or property is set, or null if the location is static.
value
Type: T
The new value assigned to the field or property.

Type Parameters

T

Return Value

Type: 
The field or property value.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ILocationBinding<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also