Last post Jun 15, 2018 12:50 PM by PatriceSc
Jun 15, 2018 08:42 AM|JagjitSingh|LINK
I have written below code but it is giving above error
foreach (var process in Process.GetProcessesByName("EXCEL"))
Jun 15, 2018 12:50 PM|PatriceSc|LINK
that is foreach (var process in System.Diagnostics.Process.GetProcessesByName("EXCEL")) should always work.
If you want to use foreach (var process in Process.GetProcessesByName("EXCEL")) you have to use :
so that the compiler can search this namespace and figure out your code actually uses "System.Diagnostics.Process"