How to statically verify that some C # code is functioning?

When writing in functional style in C #, are there any tools for statically checking that classes are immutable and functions are clean? I assume that this is not possible in the general case, but a tool that will be useful in 90% of cases will be useful.

I can imagine some reflection that checks that all member variables readonly, and that all member types (and all visible subtypes) are also immutable (recursively). I have no idea how the function check will start functioning.

+3
source share
1 answer

[] [] , , . Design by Contract .NET 4.0. IIRC, VS Ultimate.

+1

Source: https://habr.com/ru/post/1794750/


All Articles