有没有办法知道当前进程中当前使用的内存?我查了很多问题:How to get the amount of memory used by an applicationHow to get memory available or used in C#它们不适用于.Net Standard 1.6.解决方法:在这里,...
有没有办法知道当前进程中当前使用的内存?
我查了很多问题:
How to get the amount of memory used by an application
How to get memory available or used in C#
它们不适用于.Net Standard 1.6.
解决方法:
在这里,您可以检查它在HealthChecks project中的完成情况.您可以使用System.Diagnostics命名空间中的Process类.
*编辑*
可能需要添加System.Diagnostics.Process Nuget package.
.NET Standard仅支持xxxx64内存属性(例如PrivateMemorySize64而不是PrivateMemorySize).
本文标题为:如何在C#.net core / .net标准中获取或使用内存
基础教程推荐
- C#使用SQL DataAdapter数据适配代码实例 2023-01-06
- C#中参数的传递方式详解 2023-06-27
- 如何用C#创建用户自定义异常浅析 2023-04-21
- C#执行EXE文件与输出消息的提取操作 2023-04-14
- C#使用Chart绘制曲线 2023-05-22
- C#使用NPOI将excel导入到list的方法 2023-05-22
- C# TreeView从数据库绑定数据的示例 2023-04-09
- Unity虚拟摇杆的实现方法 2023-02-16
- 浅谈C# 构造方法(函数) 2023-03-03
- C#实现归并排序 2023-05-31
