0
C# method txt
My homework: Please write a method that finds the given keyword and value from the config.txt file and returns it. Config.txt: Firmenname = Firmen ABC UID= AT324852 Email = office@firmenabc.at Gf = Max Mustermann Can someboy help me? My windows wonât boot up but I need something for tomorrow! Thanks!
3 Answers
+ 4
Attila KrizsĂł ,
is it just to read the the content line by line and print it, or is there a kind of selection. does the file have multiple companies / users ...
it needs a bit more information.
thanks!
0
using System;
using System.IO;
public class Program
{
static public void Main ()
{
string inhalt = "";
inhalt = File.ReadAllText(@"D:\meineDateien\Config.txt");
Console.WriteLine(inhalt);
}
}
0
It has just these 4 lines. No other data. If Iâd like to know the UID the method have to return just the UID. If Iâd like to have only the email adress, the method have to return only the email adress. Etc.