Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
MSG .NET
>
Tutorial
> Create task
The following example shows you how to create a task.
C# example
using System; using Independentsoft.Msg; namespace Sample { class Program { static void Main(string[] args) { Message task = new Message(); task.MessageClass = "IPM.Task"; task.Subject = "Test"; task.Body = "Body text"; task.Owner = "John"; task.TaskStatus = TaskStatus.NotStarted; task.Priority = Priority.High; task.TaskStartDate = DateTime.Today.AddDays(1); task.TaskDueDate = DateTime.Today.AddDays(5); task.Save("c:\\temp\\task.msg", true); } } }
VB example
Imports System Imports Independentsoft.Msg Namespace Sample Class Module1 Shared Sub Main(ByVal args As String()) Dim task As New Message() task.MessageClass = "IPM.Task" task.Subject = "Test" task.Body = "Body text" task.Owner = "John" task.TaskStatus = TaskStatus.NotStarted task.Priority = Priority.High task.TaskStartDate = DateTime.Today.AddDays(1) task.TaskDueDate = DateTime.Today.AddDays(5) task.Save("c:\temp\task.msg", True) End Sub End Class End Namespace
Need help? Ask our developers:
Name*
Email*
Message*