.NET code to change a Photon cloud variable


I am new to Particle coding. I know how to post and parse a request for a particle variable.

But how can I, using VB or C#, change a variable in a Particle sketch using a Http POST?

I guess the Windows SDK will give you some insight.

But changing a Particle.variable() is nothing you can do from the outside directly. Particle.variable()s are only to be read (hence only available via GET requests).
To change a Particle.variable() you’d need to POST a Particle.function() request or trigger a Particle.subscribe() handler via pushing an event which - in turn - manipulates the underlying variable.

Thank you ScruffR.

In my code, I do have a particle function.

My question should have been correctly phrased by asking about the correct approach/syntax for doing the following in a .NET program so I can change the value of a variable:

curl https://api.particle.io/v1/devices/3700240…353532343635/brew -d arg=“1” -d access_token=1923dc2e0ed33e…4db99a9575bf34a

I also found this which partially answers my question:

But how does one format this call to a Particle function:

-d access_token=1234123412341234123412341234123412341234
-d “args=202,230”