Skip to content

Instantly share code, notes, and snippets.

View kevingermain's full-sized avatar
😁
Happy developer

Kévin Germain kevingermain

😁
Happy developer
View GitHub Profile
@kevingermain
kevingermain / ProcessAsyncHelper.cs
Created January 18, 2021 23:39 — forked from AlexMAS/ProcessAsyncHelper.cs
The right way to run external process in .NET (async version)
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();