I'm trying to build a Windows Universal App (UWP). I've downloaded the community edition of Visual Studio and started a blank app.
One of the things I want to do is to use the process class to get information about a certain process that is running.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace MyApp
{
class MyClass
{
public MyClass()
{
var MyProcess = System.Diagnostics.Process.GetProcesses().FirstOrDefault(f => f.ProcessName == "MyProcess");
}
}
}
However this doesn't work. The project won't build because it can't find the process class. Does anyone know what's I'm doing wrong? Do I need to included a reference to that class?