VCard CollectionWrite To Stream Method
This can be used to write an entire collection of vCards to a PDI data stream
Definition
Namespace: EWSoftware.PDI.Objects
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
C#
public void WriteToStream(
TextWriter tw
)VB
Public Sub WriteToStream (
tw As TextWriter
)C++
public:
void WriteToStream(
TextWriter^ tw
)F#
member WriteToStream :
tw : TextWriter -> unit Parameters
- tw TextWriter
- A TextWriter derived class to which the vCards are written
Example
C#
// Create a vCard collection and some vCards
VCardCollection vCards = new VCardCollection();
VCard vc = new VCard();
vc.FormattedName.Value = "Smith, John";
vc.Name.FamilyName = "Smith";
vc.Name.GivenName = "John";
vCards.Add(vc);
vc = new VCard();
vc.FormattedName.Value = "Doe, Jane";
vc.Name.FamilyName = "Doe";
vc.Name.GivenName = "Jane";
vCards.Add(vc);
// Open the file and write the vCards to it
StreamWriter sw = new StreamWriter(@"C:\AddressBook.vcf");
vCards.WriteToStream(sw);
sw.Close();VB
' Create a vCard collection and some vCards
Dim vCards As New VCardCollection()
Dim vc As New VCard()
vc.FormattedName.Value = "Smith, John"
vc.Name.FamilyName = "Smith"
vc.Name.GivenName = "John"
vCards.Add(vc)
vc = New VCard()
vc.FormattedName.Value = "Doe, Jane"
vc.Name.FamilyName = "Doe"
vc.Name.GivenName = "Jane"
vCards.Add(vc)
' Open the file and write the vCards to it
Dim sw As New StreamWriter("C:\AddressBook.vcf")
vCards.WriteToStream(sw)
sw.Close()C++
No code example is currently available or this language may not be supported.F#
No code example is currently available or this language may not be supported.