inhoud txt bestand naar string variabele

Status
Niet open voor verdere reacties.

RookieVB

Gebruiker
Lid geworden
17 feb 2010
Berichten
11
Hallo,

Ik heb de volgende vraag in VB.net:

You need to read the entire contents of a file named Questions.txt into a single string variable. How could you accomplish this?

Volgens mij kan ik hiervoor de file class gebruiken met methode File.ReadAllText(). Hierbij wordt rechtstreeks de gehele inhoud in een string geplaatst en de file afgesloten. Of moet ik toch gebruik maken van een filestream?
 
Hallo,

Ik heb de volgende vraag in VB.net:

You need to read the entire contents of a file named Questions.txt into a single string variable. How could you accomplish this?

Volgens mij kan ik hiervoor de file class gebruiken met methode File.ReadAllText(). Hierbij wordt rechtstreeks de gehele inhoud in een string geplaatst en de file afgesloten. Of moet ik toch gebruik maken van een filestream?

 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan