VCardWriteToStream(TextWriter) Method

This can be used to write a vCard to a PDI data stream

Definition

Namespace: EWSoftware.PDI.Objects
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2023.1.2.0
public void WriteToStream(
	TextWriter tw
)

Parameters

tw  TextWriter
A TextWriter derived class to which the vCard is written.

Remarks

This is called by ToString as well as owning objects when they convert themselves to a string or write themselves to a PDI data stream.

Example

C#
// Create a vCard
VCard vc = new VCard();
vc.FormattedName.Value = "Smith, John";
vc.Name.FamilyName = "Smith";
vc.Name.GivenName = "John";

// Open the file and write the vCard to it
StreamWriter sw = new StreamWriter(@"C:\AddressBook.vcf");
vc.WriteToStream(sw);
sw.Close();

See Also