I'm not sure if you are looking for absolutely immutable types in .NET or types that are absolutely immutable in general. Also, do you only want to care about public types in .NET? A deeper problem is determining which forms are immutable. A class that only has
public readonly int[] Numbers;
makes it immutable? The number itself cannot be changed, but its contents can be. You get the idea.
In any case, you can test yourself programmatically. For deeper nested checks you will need a recursion (which I will not do here)
Download all the assemblies you want to test and do something like (not verified)
var immutables = AppDomain.CurrentDomain .GetAssemblies() .SelectMany(t => t.GetTypes()) .Where(t => t .GetProperties(your binding flags depending on your definition) .All(p => !p.CanWrite) && t .GetFields(your binding flags depending on your definition) .All(f => f.IsInitOnly) .ToList();
Even this will not be enough to search for the immutability of collection types. Some of the immutable collection types (although not part of the default .NET kernel) can be found here: Immutable collections
Some notable immutable:
source share