Beispiel #1
0
        public void set(ValuePair item)
        {
            int index = getIndex(item.name);

            if (index < 0)
            {
                pair_list.Add(item);
            }
            else
            {
                pair_list[index] = item;
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        public void set(string name, string value)
        {
            ValuePair pair = new ValuePair(name, value);

            set(pair);
        }