Multiple choice technology programming languages

Which among this is a valid Method of File Class ?

  1. ReadAllLine()

  2. ReadAllBytes()

  3. ReadAllTexts()

  4. WriteAllLine()

  5. WriteAllTexts()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In the C# System.IO.File class, ReadAllBytes() is a valid built-in method. The other options are incorrect because they use incorrect naming: the correct framework methods are plural ReadAllLines(), singular ReadAllText(), plural WriteAllLines(), and singular WriteAllText(). C# is case-sensitive and strict about method signatures.