Ejemplo n.º 1
0
public static void Main()
{
var processes = new List<MyPc>();
foreach(var process in Process.GetProcesses())
{
var data = new MyPc();
data.Id = process.Id;
data.Name = process.ProcessName;
data.Memory = process.WorkingSet64;
processes.Add(data);
}
Console.WriteLine(processes);
}
Ejemplo n.º 2
0
        static void Main()
        {
            IMotherBoard myMotherBoard = new MotherBoardB250M();
            IMemory      myMemory      = new Memory120Gb();
            ICpu         myCpu         = new IntelI5();

            MyPc myPc = new MyPc(myMotherBoard, myMemory, myCpu);

            Person me = new Person();

            me.DoWork(myPc);

            Console.ReadKey();
        }