このコードが C++/CLI では機能しないのに、C# では非常に簡単なのはなぜでしょうか?
List<Process^>^ processList = gcnew List<Process^>(
Process::GetProcessesByName(this->processName)););
エラー C2664: 'System::Collections::Generic::List::List(System::Collections::Generic::IEnumerable ^)': パラメーター 1 を 'cli::array ^' から 'System::Collections に変換できません::Generic::IEnumerable ^'
これが私が思いついたものです。完璧にうまくいきました。:)
List<Process^>^ processList = gcnew List<Process^>(
safe_cast<System::Collections::Generic::IEnumerable<Process^>^>
(Process::GetProcessesByName(this->processName)));