XmlTextWriter.WriteCharEntity Method forces the generation of a character entity for the specified Unicode character value. : XmlTextWriter « XML « VB.Net
XmlTextWriter.WriteCharEntity Method forces the generation of a character entity for the specified Unicode character value.
Imports System
Imports System.Xml
publicclass Sample
public shared sub Main()
Dim writer as XmlTextWriter = nothing
try
writer = new XmlTextWriter (Console.Out)
writer.WriteStartElement("address")
writer.WriteString("someone")
writer.WriteCharEntity("@"c)
writer.WriteString("example")
writer.WriteCharEntity("."c)
writer.WriteString("com")
writer.WriteEndElement()
finallyif not writer is nothing
writer.Close()
end if
end try
end sub
end class