-
Notifications
You must be signed in to change notification settings - Fork 2
/
Utility.cs
38 lines (31 loc) · 924 Bytes
/
Utility.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace hackathon1
{
public static class Utility
{
internal static List<User> users = new List<User>();
public static void load_users()
{
string path = @"C:\Users\User\Downloads\hackathon\bin\Debug\form\TextFile1.txt";
StreamReader srr = new StreamReader(path);
var strr = srr.ReadLine();
while ( strr != null )
{
string[] k = null;
k = strr.Split(',');
string username = k[0];
string email = k[1];
string pass = k[2];
User u = new User(username, email, pass);
users.Add(u);
strr = srr.ReadLine();
srr.Close();
}
}
}
}