0

I have this code

 string poet;
        foreach (string file in Directory.EnumerateFiles(@"C:\D\", "*.TXT"))
        {
            poet += File.ReadAllText(file,????);
            poet += "\n=================\n";
        }

I just want to add something to this could in the question marks place to get the encoding of each file and read it correctly , I have like a million file and the encoding is different so I can't choose an encoding in the code and i have to find a way to get the encoding of each file alone >>> thanks in advance to everyone who might save me , and I am not committed to this specif code I just want to do what I described ...

0 Answers0