AjaxControlToolkit.Jasmine.Suites.ReorderListItems.InsertItem C# (CSharp) Method

InsertItem() public method

public InsertItem ( string title, int priority ) : void
title string
priority int
return void
        public void InsertItem(string title, int priority)
        {
            if(String.IsNullOrEmpty(title))
                return;

            var item = new ReorderListItem() {
                ID = Items[Items.Count - 1].ID + 1,
                Title = title,
                Description = "Additional description",
                Priority = Items[Items.Count - 1].Priority + 1
            };

            Items.Add(item);
        }