When Below Function is called, xml returned as ?<?xml can anyone please help how to get proper xml without ? in the front.
Public Shared Function SerializeObject(Of T)(ByVal obj As T) As String
Dim xmlString As String = Nothing
Dim memoryStream As New MemoryStream()
Dim xs As New XmlSerializer(GetType(T))
Dim xmlTextWriter As New XmlTextWriter(memoryStream, Encoding.UTF8)
memoryStream = CType(xmlTextWriter.BaseStream, MemoryStream)
xmlString = UTF8ByteArrayToString(memoryStream.ToArray())