Skip to content

Instantly share code, notes, and snippets.

@mouseroot
Created November 7, 2014 19:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mouseroot/fb11b68d12c6c362d4f8 to your computer and use it in GitHub Desktop.
Save mouseroot/fb11b68d12c6c362d4f8 to your computer and use it in GitHub Desktop.
C# Snippets
/*C# Snippets
---------------
Open process
--------------------------------
*/
using System.Diagnostics
Process gdb;
ProcessStartInfo pInfo;
pInfo = new ProcessStartInfo();
pInfo.CreateNoWindow = true;
pInfo.UseShellExecute = false;
pInfo.RedirectStandardOutput = true;
pInfo.RedirectStandardInput = true;
pInfo.FileName = "C:/MinGW/bin/gdb.exe";
gdb = Process.Start(pInfo);
/*
Add Zip entries to listbox control
------------------------
*/
listBox1.Items.Clear();
foreach (ZipArchiveEntry file in zip.Entries.ToArray<ZipArchiveEntry>())
{
listBox1.Items.Add(file.Name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment