JSObject.SetProperty Method  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| SetProperty(String, Boolean) | 
						 Defines a new property on the target object, or modifies an existing property to have the specified value.  | 
        	
| SetProperty(String, Byte[]) | 
						 Defines a new property on the target object, or modifies an existing property to have the specified value.  | 
        	
| SetProperty(String, Double) | 
						 Defines a new property on the target object, or modifies an existing property to have the specified value.  | 
        	
| SetProperty(String, Int32) | 
						 Defines a new property on the target object, or modifies an existing property to have the specified value.  | 
        	
| SetProperty(String, JSObject) | 
						 Defines a new property on the target object, or modifies an existing property to have the specified value.  | 
        	
| SetProperty(String, String) | 
						 Defines a new property on the target object, or modifies an existing property to have the specified value.  | 
        	
SetProperty(String, Boolean)
Defines a new property on the target object, or modifies an existing property to have the specified value.
public:
 void SetProperty(System::String ^ propertyName, bool value);
	public void SetProperty(string propertyName, bool value);
	member this.SetProperty : string * bool -> unit
	Public Sub SetProperty (propertyName As String, value As Boolean)
	Parameters
- propertyName
 - String
 
The name of the property.
- value
 - Boolean
 
The value of property to set.
Applies to
SetProperty(String, Byte[])
Defines a new property on the target object, or modifies an existing property to have the specified value.
public:
 void SetProperty(System::String ^ propertyName, cli::array <System::Byte> ^ value);
	public void SetProperty(string propertyName, byte[]? value);
	member this.SetProperty : string * byte[] -> unit
	Public Sub SetProperty (propertyName As String, value As Byte())
	Parameters
- propertyName
 - String
 
The name of the property.
- value
 - Byte[]
 
The value of property to set.
Remarks
The method will copy the bytes.
Applies to
SetProperty(String, Double)
Defines a new property on the target object, or modifies an existing property to have the specified value.
public:
 void SetProperty(System::String ^ propertyName, double value);
	public void SetProperty(string propertyName, double value);
	member this.SetProperty : string * double -> unit
	Public Sub SetProperty (propertyName As String, value As Double)
	Parameters
- propertyName
 - String
 
The name of the property.
- value
 - Double
 
The value of property to set.
Applies to
SetProperty(String, Int32)
Defines a new property on the target object, or modifies an existing property to have the specified value.
public:
 void SetProperty(System::String ^ propertyName, int value);
	public void SetProperty(string propertyName, int value);
	member this.SetProperty : string * int -> unit
	Public Sub SetProperty (propertyName As String, value As Integer)
	Parameters
- propertyName
 - String
 
The name of the property.
- value
 - Int32
 
The value of property to set.
Applies to
SetProperty(String, JSObject)
Defines a new property on the target object, or modifies an existing property to have the specified value.
public:
 void SetProperty(System::String ^ propertyName, System::Runtime::InteropServices::JavaScript::JSObject ^ value);
	public void SetProperty(string propertyName, System.Runtime.InteropServices.JavaScript.JSObject? value);
	member this.SetProperty : string * System.Runtime.InteropServices.JavaScript.JSObject -> unit
	Public Sub SetProperty (propertyName As String, value As JSObject)
	Parameters
- propertyName
 - String
 
The name of the property.
- value
 - JSObject
 
The value of property to set.
Applies to
SetProperty(String, String)
Defines a new property on the target object, or modifies an existing property to have the specified value.
public:
 void SetProperty(System::String ^ propertyName, System::String ^ value);
	public void SetProperty(string propertyName, string? value);
	member this.SetProperty : string * string -> unit
	Public Sub SetProperty (propertyName As String, value As String)
	Parameters
- propertyName
 - String
 
The name of the property.
- value
 - String
 
The value of property to set.