Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +-------+-------+
- | host | count |
- +-------+-------+
- | comp1 | 2 |
- +-------+-------+
- | comp2 | 3 |
- +-------+-------+
- | comp3 | 2 |
- +-------+-------+
- +----+-------+
- | id | host |
- +----+-------+
- | 1 | comp1 |
- +----+-------+
- | 2 | comp2 |
- +----+-------+
- | 3 | comp1 |
- +----+-------+
- | 4 | comp3 |
- +----+-------+
- | 5 | comp1 |
- +----+-------+
- | 6 | comp3 |
- +----+-------+
- for (int i = 0; i < distinct.Rows.Count; i++)
- {
- if (Convert.ToInt32(distinct.Rows[i][1]) < 3)
- {
- foreach (DataRow row in t.Select())
- {
- if (row[1].ToString() == distinct.Rows[i][0].ToString())
- {
- row.Delete();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement