Hello,
I have a class like the following
public class person
public FirstName as string
public LastName as string
end class
I am serializing the class. I want to conditionally not render a property if
it is blank. For example if LastName = "", I don't want to display it.
I am serializing it using the following:
Dim p as person = new Person
p.FirstName = "John"
Dim sw As StringWriter = New StringWriter
Dim ser As XmlSerializer = New XmlSerializer(GetType(Person))
ser.Serialize(sw,p)
Any ideas?
Thanks in advance.