How to run this code gh.RunSolver(False) using c#?

This is code using python:
for i in range(3):
slider.SetSliderValue(i, false)
print "Slider value: "+str(i)
gh.RunSolver(false)
print "Result value: "+str(out.VolatileData[0][0])
I want apply that code into code of my, but i don’t know how to apply it in C # language
How to i run this code in C#?. This is refer URL: https://www.grasshopper3d.com/forum/topics/automate-sliders-extract-model-data?page=1&commentId=2985220%3AComment%3A923011&x=1#2985220Comment923011

Best regards