Read Entire File into a String
…in one easy step.
String wholeFile
=
File.
ReadAllText
(
@
"C:
\T
emp.txt"
)
;
code snippet
,
c sharp
,
input output