We need to specify a certain sort order for the fields of a class which is serialized to XML. I appreciate that it's not necessarily good practice to rely on sort order when dealing with XML elements but in our case there's a reason to do so.
So ... this answer for C# advises using XmlElementAttribute
and I've translated the C# to VB as:
<System.Xml.Serialization.XmlElementAttribute(Order = 1)> _
Public Property Foo() As String
etcs
But it complains that Name 'Order 'is not declared
. Have I mistranslated from C# or is there some other issue here?