I have to convert this part of code to C# but I have no idea how. Need your help, guys!

 for /f "tokens=*" %%a in ('curl -s -m 3 http://hghgh.hgh.fgfjk/ ^| jq .ua') do set uagent=%%a

I think, I should use ProcessStartInfo, but not sure about -s -m and ^| jq .ua parts

You might be better off using a .net wrapper for the libcurl library, of which google shows there are several, rather than trying to run a separate process.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.