Enmarcha.SharePoint.Entities.Artefacts.ListSharePoint.Delete C# (CSharp) Method

Delete() public method

Delete List
public Delete ( ) : bool
return bool
        public bool Delete()
        {
            try
            {
                Web.GetList(SPUrlUtility.CombineUrl(Web.Url, string.Concat("/lists/", Name))).Delete();
            }
            catch (Exception exception)
            {
                Logger.Error(string.Concat("Delete :", exception.Message));
                return false;
            }
            return true;
        }

Usage Example

 public void CreateList()
 {
     if (!ContextSharePoint.VerifyServer(Site)) Assert.Inconclusive();
     ListSharePoint= new ListSharePoint(Site.RootWeb,Logger,"LISTATEST");
    Assert.IsTrue(ListSharePoint.Create("descripcion", ListTemplateType.Contacts, true));
     Assert.IsTrue(ListSharePoint.Delete());
 }
All Usage Examples Of Enmarcha.SharePoint.Entities.Artefacts.ListSharePoint::Delete