• using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Reflection;
    using System.IO;
    using System.Diagnostics;

    namespace задание9._3
    {
    class Program
    {
    static void Main()
    {

    }
    static void EnumModsForPid(int pID)
    {
    Process theProc = null;
    Console.WriteLine();
    try
    {
    theProc = Process.GetProcessByld(pID);
    Console.WriteLine();
    }
    catch(ArgumentException ex)
    {
    Console.WriteLine(ex.Message);
    return;
    }
    Console.WriteLine("Here are the loaded modules for: {0}", theProc.ProcessName);
    try
    {
    ProcessModuleCollection theMods = theProc.Modules;
    foreach(ProcessModule pm in theMods)
    {
    string info = string.Format ("-> Mod Name: {0}", pm.ModuleName);
    Console.WriteLine(info);
    }
    }
    catch(Exception ex)
    {
    Console.WriteLine(ex.Message);
    }
    }
    }
    }
    как сделать ручной ввод ID процесса? язык C#

Ответы 1

  • class Program    {                static void Main(string[] args)        {             int pID = 0;            Console.WriteLine("Введите pID");           pID = Convert.ToInt32(Console.ReadLine()); EnumModsForPid(pID);        }        static void EnumModsForPid(int pID)        {        }    }так подойдет?
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years