Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
WebDAV .NET for Exchange
>
Tutorial
> Delete item or folder
The following example shows you how to delete item or folder.
C# example
using System; using System.Net; using Independentsoft.Webdav.Exchange; namespace Sample { class Program { static void Main(string[] args) { NetworkCredential credential = new NetworkCredential("username", "password"); WebdavSession session = new WebdavSession(credential); Resource resource = new Resource(session); //Delete appointment resource.Delete("https://myserver/exchange/emailaddress/Calendar/appointment1.eml"); //Delete folder resource.Delete("https://myserver/exchange/emailaddress/Test"); } } }
VB example
Imports System Imports System.Net Imports Independentsoft.Webdav.Exchange Module Module1 Sub Main(ByVal args() As String) Dim credential As NetworkCredential = New NetworkCredential("username", "password") Dim session As WebdavSession = New WebdavSession(credential) Dim resource As Resource = New Resource(session) 'Delete appointment resource.Delete("https://myserver/exchange/emailaddress/Calendar/appointment1.eml") 'Delete folder resource.Delete("https://myserver/exchange/emailaddress/Test") End Sub End Module