-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTable.cs
More file actions
30 lines (26 loc) · 789 Bytes
/
Table.cs
File metadata and controls
30 lines (26 loc) · 789 Bytes
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
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace IBAN_Manager
{
class Table
{
public static void LoadTable(Dictionary<string, string> table)
{
try
{
var lines = File.ReadAllLines("table.ini");
foreach (var line in lines)
{
string[] values = line.Split(',');
table.Add(values[0], values[1]);
}
}
catch
{
throw new Exception("Failed to load IBAN table data. Maybe table.ini is missing? It needs to be placed in the application folder. It can be found here: https://github.com/adrenaline96/IBAN-Manager-Library/blob/master/table.ini");
}
}
}
}