c#获取当前进程使用内存

        public static string GetMemory()
        {
            Process proc = Process.GetCurrentProcess();
            long b = proc.PrivateMemorySize64;
            for (int i = 0; i < 2; i++)
            {
                b /= 1024;
            }
            return b + "MB";
        }

原文地址:https://www.cnblogs.com/yidanda888/p/15645302.html