-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataCollect.txt
More file actions
42 lines (35 loc) · 764 Bytes
/
DataCollect.txt
File metadata and controls
42 lines (35 loc) · 764 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
31
32
33
34
35
36
37
38
39
40
41
42
/**
*@version 1.4
*@auth KE
*/
using System;
using System.Collections.Generic;
public class DataCollect {
IDictionary<string, string> dict = new Dictionary<string, string>();
EventData eventData = new EventData;
SomeData data = new SomeData;
public DataCollect() {
}//end constr.
//Insert into dict
public void insertDict(string temp, string input) {
dict.Add(temp, input);
}
//remove from dict
public void removeKey(string key){
dict.Remove(key);
}
public void removeAll() {
dict.Clear();
}
//search through dict
public bool findKey(string key) {
bool exists = dict.ContainsKey(key);
//err catch
if(!exists) {
Console.WriteLine("ERR: Key not found.");
return false;
} else {
return exists;
}
}//end findKey
}