public void set(ValuePair item) { int index = getIndex(item.name); if (index < 0) { pair_list.Add(item); } else { pair_list[index] = item; } }
public static List <ValuePair> valuePair(string[] range) { if (range == null || range.Length <= 0) { return(new List <ValuePair>()); } List <ValuePair> list = new List <ValuePair>(); for (int i = 0; i < range.Length; i++) { if (range[i] == "") { continue; } ValuePair pair = new ValuePair(); pair.name = range[i]; pair.value = pair.name; list.Add(pair); } return(list); }
public void set(string name, string value) { ValuePair pair = new ValuePair(name, value); set(pair); }