Duaa
Duaa

Reputation: 171

What is the best way to measure the memory usage of a C# function?

I'm looking for an accurate way to measure memory usage of a C# program under Windows operating system. I'm using Visual Studio for programming my code and I want to know its time consuming for performance. Really, I tried to use the Task Manager, but I do not get an accurate measurment.

Please, if any one know an accurate way to measure the memory consumption, please help me and thanks alot

Upvotes: 0

Views: 467

Answers (1)

JasCav
JasCav

Reputation: 34632

In order to measure memory usage, you'll need to use a profiler. You can head over to this SO question: "What are some good .NET profilers?" to receive all the information you could want on profiling tools. Head to their respective websites to learn how to use them.

Upvotes: 1

Related Questions