ThingWorx Edge .NET SDK > ThingWorx Edge .NET SDK Reference > .NET SDK: VirtualThing Class > .NET SDK: Property Value Modifications
  
.NET SDK: Property Value Modifications
The VirtualThing class contains several methods that can be called to update the value of a property.
* 
Updating a property value does not send the value to the ThingWorx platform. To send the value to the platform, you must call the updateSubscribedProperties() method of the VirtualThing class.
Methods for Modifying Property Values
The following table lists and briefly describes methods available for the VirtualThing class.
Method
Description
setPropertyVTQ(System.String,com.thingworx.types.primitives.structs.VTQ,System.Boolean
Set the value of a property, using a VTQ (value, time, and quality) structure:
name — The name of the property.
value — The VTQ (value, time, and quality) for the property’s value.
forceConnect — Set this value to true to force the value to be sent to the ThingWorx platform, even if it has not changed. This option is a good option for sending the first value or sending a value immediately after a reconnect.
setPropertyValue(System.String,com.thingworx.types.primitives.IPrimitiveType)
Set the value of a property, using a primitive type:
name — The name of the property.
value — The primitive value.
setProperty(System.String,System.Object)
Set the value of a property, using an object
name — The name of the property.
value — An object representing the value to set. The value is cast to the type of property if possible; otherwise, an exception is thrown.
The example below uses the methods to set new properties and update the values of existing properties.
* 
Be sure to call the updateSubscribedProperties() method on the VirtualThing to send the property values to your ThingWorx platform. This functionality is also illustrated in the Steam Sensor Example for the .NET SDK.
setPropertyVTQ
VTQ vtq = new VTQ();
vtq.setValue(new NumberPrimitive(123.456));
vtq.setTime(new DateTime());
vtq.setQuality(QualityStatus.GOOD);
base.setPropertyVTQ("MyProperty", vtq);

setPropertyValue
NumberPrimitive value = new NumberPrimitive(123.456);
base.setPropertyValue("MyProperty", value);

setProperty
base.setProperty("MyProperty", 123.456);