Click or drag to resize

CalendarGetSimpleBytes Method

Gives a iCalendar entry. Details of create of iCalendar entry see CreateSimple(String, String, DateTime, DateTime, String, Boolean)

Namespace:  SIC.File
Assembly:  SIC (in SIC.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public static byte[] GetSimpleBytes(
	string pSubject,
	string pDescription,
	DateTime pBeginDate,
	DateTime pEndDate,
	string pLocation = ""
)

Parameters

pSubject
Type: SystemString
title of calendar entry
pDescription
Type: SystemString
content of calendar entry
pBeginDate
Type: SystemDateTime
begin date time of meeting
pEndDate
Type: SystemDateTime
end date time of meeting
pLocation (Optional)
Type: SystemString
meeting point

Return Value

Type: Byte

[Missing <returns> documentation for "M:SIC.File.Calendar.GetSimpleBytes(System.String,System.String,System.DateTime,System.DateTime,System.String)"]

Remarks
Examples
This example create a iCal email attachment.
//* create iCal content *
byte[] liCalContent = SIC.File.Calendar.GetSimpleBytes(lObject, lBody, (System.DateTime)pTicket.DueDate, (System.DateTime)pTicket.DueDate);

//* definition MIME type *
System.Net.Mime.ContentType lMimeType = new System.Net.Mime.ContentType("text/calendar; method=REQUEST");

//* declaration attachments list and attachment object *
List<System.Net.Mail.Attachment> lAttachments = new List<System.Net.Mail.Attachment>();
System.Net.Mail.Attachment lAttachment;

//* create attachment and added to attachment list *
lAttachment = new System.Net.Mail.Attachment(new System.IO.MemoryStream(liCalContent), lMimeType);
lAttachment.Name = "Ticket_" + Guid.NewGuid().ToString() + ".ics";
lAttachments.Add(lAttachment);
See Also