Horje
Read from textfile and fill in textbox Code Example
Read from textfile and fill in textbox
private void Form1_Load(object sender, EventArgs e)
{
    string line = "";
    System.IO.StreamReader file = new System.IO.StreamReader(@"FilePathWithNameAndExtension");
    while (!file.EndOfStream)
    {
        line += file.ReadLine() + "&"; //adding distinct value so that we can split them as a line.
    }
    string[] newLines = line.Split('&'); //storing lines in array.
    txtUserName.Text = newLines[1].Split(':')[1].ToString(); //newLines[1] represent to UserName that means we will extract from second line which is storing the username.
    txtCountry.Text = newLines[2].Split(':')[1].ToString();
    txtMemberShip.Text = newLines[3].Split(':')[1].ToString();
}




Csharp

Related
how to stop timer in c# windows application Code Example how to stop timer in c# windows application Code Example
c# disable docking sub member in panel Code Example c# disable docking sub member in panel Code Example
iis services in asp.net Code Example iis services in asp.net Code Example
multidimensional meaning Code Example multidimensional meaning Code Example
c# use enum in class Code Example c# use enum in class Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9