Closed
Description
The remarks of File.ReadAlltext() say
Encoding formats UTF-8 and UTF-32 (both big-endian and little-endian) can be detected.
But according to referencesource it uses a StreamReader which supports more encoding detections
It automatically recognizes UTF-8, little-endian Unicode, big-endian Unicode, little-endian UTF-32, and big-endian UTF-32 text if the file starts with the appropriate byte order marks.