Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. List<string> emails = new List<string>();
  2. List<string> passwords = new List<string>();
  3.  
  4. GetAccounts.GetAccount(emails, passwords);
  5.  
  6. static public void GetAccount(List<string> emails, List<string> passwords)
  7.         {
  8.             try
  9.             {
  10.                 using (StreamReader sr = new StreamReader($@"../../../Account.txt"))
  11.                 {
  12.                     string line;
  13.  
  14.                     while ((line = sr.ReadLine()) != null)
  15.                     {
  16.                         string[] words = line.Split(new char[] { ' ' });
  17.  
  18.                         string email = words[1];
  19.                         string password = words[3];
  20.  
  21.                         emails.Add(email);
  22.                         passwords.Add(password);
  23.                     }
  24.                 }
  25.             }
  26.             catch (Exception e)
  27.             {
  28.                 Console.WriteLine("The file could not be read:");
  29.                 Console.WriteLine(e.Message);
  30.             }
  31.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement