I want to find the size of a MemoryCache
.
MemoryCache _cache = MemoryCache.Default;
_cache.Add("key", "value");
FindSize(_cache);
I want to implement the FindSize()
method.
I am afraid you can't find size of .NET object at runtime. See these answers for more details: