bool isRunning = Process.GetProcessesByName("test")
.FirstOrDefault(p => p.MainModule.FileName.StartsWith(@"c:\loc1")) != default(Process);
More Related Contents:
- How to capture drop-down, checkbox and radio selected text? [closed]
- How to cancel Task await after a timeout period
- Difference between two lists
- how can you easily check if access is denied for a file in .NET?
- How do I make a WinForms app go Full Screen
- What is the best way to implement a “timer”? [duplicate]
- converting a .net Func to a .net Expression
- Passing data between different controller action methods
- SmtpException: Unable to read data from the transport connection: net_io_connectionclosed
- How to get a JSON string from URL?
- How can I make the value of a variable track the value of another
- For loop not returning expected value – C# – Blazor
- How do I get around the “‘” problem in sqlite and c#?
- Calling Oracle stored procedure from C#?
- Save modified WordprocessingDocument to new file
- Return content with IHttpActionResult for non-OK response
- Return all enumerables with yield return at once; without looping through
- Difference between the System.Array.CopyTo() and System.Array.Clone()
- How can I dynamically change auto complete entries in a C# combobox or textbox?
- WCF service attribute to log method calls and exceptions
- Equivalent of JObject in System.Text.Json
- DateTime column type becomes String type after deserializing DataTable
- Thread.Sleep() in C#
- Are P/Invoke [In, Out] attributes optional for marshaling arrays?
- Chart Auto Scroll (Oscilloscope Effect)
- Solve a cross-threading Exception in WinForms
- Read custom configuration file in C# (Framework 4.0)
- How can I capture as bitmap only what a picturebox is displaying, without using “copy from screen”?
- Passing a variable between Windows Forms forms
- Compare two Color objects