J
jamie
I almost never use enumerations.
I've been given a class by using XSD /c on a schema file. This will be
used to generate an XML file
It gives me back lots of classes Anyways one of those classes is
public class Transmit{
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string Count;
public TransmitType Type;
public string Creator;
}
Now I've been creating a constructor to put the correct values in for count
and create but I don't know how to handle Type.
TransmitType is
[System.Xml.Serialization.XmlTypeAttribute(Namespace="gov.bc.ca/forests/hbs/v2")]
public enum TransmitType {
P,
T,
}
P for production T for testing. How do I specify that TransmitType is T
in the constructor fro Transmit? If I do nothing with Type I get back a P
which makes sence since I think enumerations start at 0 and count up. I
can't say Type = "T" or 1 though to get back the T I want.
I've been given a class by using XSD /c on a schema file. This will be
used to generate an XML file
It gives me back lots of classes Anyways one of those classes is
public class Transmit{
[System.Xml.Serialization.XmlElementAttribute(DataType="integer")]
public string Count;
public TransmitType Type;
public string Creator;
}
Now I've been creating a constructor to put the correct values in for count
and create but I don't know how to handle Type.
TransmitType is
[System.Xml.Serialization.XmlTypeAttribute(Namespace="gov.bc.ca/forests/hbs/v2")]
public enum TransmitType {
P,
T,
}
P for production T for testing. How do I specify that TransmitType is T
in the constructor fro Transmit? If I do nothing with Type I get back a P
which makes sence since I think enumerations start at 0 and count up. I
can't say Type = "T" or 1 though to get back the T I want.