Hack Forums
[C#] [VB.NET] & [C#] - Get System Process - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] [VB.NET] & [C#] - Get System Process (/showthread.php?tid=447631)



[VB.NET] & [C#] - Get System Process - codepoet - May 29, 2010

This is not my source but i was the one who Translated it to C#

VB.NET
Code
Module Module1
    Sub Main()
        Dim p As System.Diagnostics.Process
        For Each p In System.Diagnostics.Process.GetProcesses
            Console.WriteLine(p.ProcessName)
        Next
    End Sub
End Module

C#
Code
static class Module1
{
    public static void Main()
    {
        System.Diagnostics.Process p = default(System.Diagnostics.Process);
        foreach (var p in System.Diagnostics.Process.GetProcesses) {
            Console.WriteLine(p.ProcessName);
        }
    }
}

I hope it was helpful. ✌

-NathanE




* - Jewish - Oct 11, 2010

it's not that hard to push the convert button but this is useful none the less