ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
HostFunctions Class
HostFunctions Methods
setProperty Method
setProperty(IDynamicMetaObjectProvider, String, Object) Method
setProperty(IPropertyBag, String, Object) Method

# HostFunctionssetProperty(IPropertyBag, String, Object) Method

Sets a property value in a dynamic host object that implements IPropertyBag.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public Object setProperty(
    	IPropertyBag target,
    	string name,
    	Object value
    )

    Public Function setProperty (
    	target As IPropertyBag,
    	name As String,
    	value As Object
    ) As Object

    public:
    Object^ setProperty(
    	IPropertyBag^ target,
    	String^ name,
    	Object^ value
    )

    member setProperty :
            target : IPropertyBag *
            name : string *
            value : Object -> Object

#### Parameters

target IPropertyBag
  The dynamic host object that contains the property to set.
name String
  The name of the property to set.
value Object
  The new value of the specified property.

#### Return Value

Object
The result of the operation, which is usually the value assigned to the specified property.
Remarks
This function is provided for script languages that do not support dynamic properties.
See Also

#### Reference

HostFunctions Class
setProperty Overload
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft