コード例 #1
0
        public string[] ListToStringArray()
        {
            string[] stringInfoStrings = new string[this.taskList.Count];

            int i = 0;

            foreach (Task ItemObj in taskList)
            {
                stringInfoStrings[i++] = ItemObj.ToString();
            }
            return(stringInfoStrings);
        }
コード例 #2
0
        //public bool ChangeItem(ShoppingItem itemIn, int index)
        //{
        //    bool ok = false;
        //    if (CheckIndex(index))
        //    {
        //        ok = true;
        //        this.itemList[index] = itemIn;
        //    }
        //    return ok;
        //}

        //public bool DeleteItem(int index)
        //{
        //    bool ok = false;
        //    if (CheckIndex(index))
        //    {
        //        ok = true;
        //        this.itemList.RemoveAt(index);
        //    }
        //    return ok;
        //}

        public string[] GetItemsInfoStrings()
        {
            string[] stringInfoStrings = new string[this.itemList.Count];

            int i = 0;

            foreach (ShoppingItem ItemObj in itemList)
            {
                stringInfoStrings[i++] = ItemObj.ToString();
            }
            return(stringInfoStrings);
        }