-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRow.cs
62 lines (56 loc) · 1.62 KB
/
Row.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//*****************************************************************************
// Row.cs - Represents a row in database tabe.
//*****************************************************************************
using System;
using System.Collections.Generic;
namespace QEngine
{
public class Row
{
/// <summary>
/// Default constuctor.
/// </summary>
public Row()
{
mValues = new List<string>();
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="items">items to be represented as Row</param>
public Row(IEnumerable<string> items)
{
mValues = new List<string>();
mValues.AddRange(items);
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="row">comma separated string to be represented as Row</param>
public Row(string row)
{
mValues = new List<string>();
mValues.AddRange(row.Split(','));
}
/// <summary>
/// Addes item to this Row.
/// </summary>
/// <param name="item"></param>
public void AddItem(string item)
{
mValues.Add(item);
}
/// <summary>
/// Overrided default ToString to represent Row
/// </summary>
public override string ToString()
{
return String.Join(",", mValues);
}
/// <summary>
/// Vaules in this Row
/// </summary>
public IEnumerable<string> Values { get { return mValues; } }
List<string> mValues;
}
}