I was wondering if it was possible to prevent memory of a object (class or struct) from being swapped to disk?
Edit: As for why I\'ve been told some of the data I\'m
Depending on your environment you can also do this at the OS level instead - just use a really beefy machine with a lot of RAM, and disable paging/swap entirely. It does mean you better not ever overrun that RAM, but that's where the task comes back to C# - you can constrain max memory usage with smart design.
https://www.howtogeek.com/126430/htg-explains-what-is-the-windows-page-file-and-should-you-disable-it/