I was wondering why this code does not work in C++/CLI but damn easy in C#?
List<Process^>^ processList = gcnew List<Process^>(
Process::GetProcessesByName(this->processName)););
error C2664: 'System::Collections::Generic::List::List(System::Collections::Generic::IEnumerable ^)' : cannot convert parameter 1 from 'cli::array ^' to 'System::Collections::Generic::IEnumerable ^'
Here is what I come up with. Did perfectly well. :)
List<Process^>^ processList = gcnew List<Process^>(
safe_cast<System::Collections::Generic::IEnumerable<Process^>^>
(Process::GetProcessesByName(this->processName)));