Click here to Skip to main content
15,881,938 members
Home / Discussions / C#
   

C#

 
QuestionPaging in SQL Pin
Billa212-Apr-12 20:41
Billa212-Apr-12 20:41 
AnswerCross posted from Database forum Pin
Pete O'Hanlon12-Apr-12 22:18
mvePete O'Hanlon12-Apr-12 22:18 
QuestionProjectProblem Pin
Madhavsingh12-Apr-12 19:26
Madhavsingh12-Apr-12 19:26 
AnswerRe: ProjectProblem Pin
egenis12-Apr-12 20:01
egenis12-Apr-12 20:01 
QuestionAlwaysOnTop behavior - Windows Forms vs. Win32? Pin
Ravi Bhavnani12-Apr-12 18:59
professionalRavi Bhavnani12-Apr-12 18:59 
AnswerRe: AlwaysOnTop behavior - Windows Forms vs. Win32? Pin
Alan N12-Apr-12 23:21
Alan N12-Apr-12 23:21 
GeneralRe: AlwaysOnTop behavior - Windows Forms vs. Win32? Pin
Ravi Bhavnani13-Apr-12 5:19
professionalRavi Bhavnani13-Apr-12 5:19 
QuestionXml Serilization / Deserilization Array quesiton Pin
Jason McBurney12-Apr-12 14:09
Jason McBurney12-Apr-12 14:09 
I have an interface with a client that is been in production for many years, and I would like to alter the xml parsing system that handles this message.

Since I may have 4 different StatusTypes I desire to have an array of the these items, however, they are not in a nice collection element that will make deserlization simple, like all of the examples on the internet that I could find.

In the code below, I was hoping to get all of these items in MysticalList. Obviously, my example does not work ... How can I get my entity to work with a simple list?

XML
<xsd:complexType name="requestRailStatus">
    <xsd:sequence>
        <xsd:element name="TrainID" type="xsd:string" minOccurs="0" maxOccurs="1" />
        <xsd:element name="BeginTimePeriod" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
        <xsd:element name="EndTimePeriod" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
        <xsd:element name="StatusType" type="railStatusOptions" minOccurs="0" maxOccurs="4" />
    </xsd:sequence>
    <xsd:attribute name="timestamp" type="xsd:dateTime" use="required" />
    <xsd:attribute name="messageId" type="xsd:unsignedInt" use="required" />
</xsd:complexType>

<xsd:simpleType name="railStatusOptions">
    <xsd:restriction base="xsd:string">
        <xsd:enumeration value="ActualTimeOfArrival" />
        <xsd:enumeration value="ActualTimeOfWorking" />
        <xsd:enumeration value="ActualTimeOfCompletion" />
        <xsd:enumeration value="ActualTimeOfDeparture" />
    </xsd:restriction>
</xsd:simpleType>


C#
public partial class requestRailStatus : EntityBase
    {
        public string TrainID { get; set; }
        public System.DateTime BeginTimePeriod { get; set; }
        public System.DateTime EndTimePeriod { get; set; }

        [XmlElement("timestamp")]
        public System.DateTime TimeStamp { get; set; }

        [XmlElement("messageId")]
        public uint MessageId { get; set; }

        [XmlArray]
        public List<railStatusOptions> MysticalList { get; set; }

        public requestRailStatus() { }
    }

You can only be young once. But you can always be immature.
- Dave Barry

GeneralRe: Xml Serilization / Deserilization Array quesiton Pin
BobJanova13-Apr-12 2:34
BobJanova13-Apr-12 2:34 
GeneralRe: Xml Serilization / Deserilization Array quesiton Pin
Jason McBurney13-Apr-12 5:36
Jason McBurney13-Apr-12 5:36 
QuestionDrawing to Picturebox problem. Help needed badly Pin
aquahoya12-Apr-12 13:53
aquahoya12-Apr-12 13:53 
SuggestionRe: Drawing to Picturebox problem. Help needed badly Pin
Richard MacCutchan12-Apr-12 21:25
mveRichard MacCutchan12-Apr-12 21:25 
QuestionLearning C# through exercises Pin
jeramyRR12-Apr-12 12:44
jeramyRR12-Apr-12 12:44 
AnswerRe: Learning C# through exercises Pin
Kevin Marois12-Apr-12 13:45
professionalKevin Marois12-Apr-12 13:45 
AnswerRe: Learning C# through exercises Pin
Roger Wright12-Apr-12 19:42
professionalRoger Wright12-Apr-12 19:42 
GeneralRe: Learning C# through exercises Pin
jeramyRR12-Apr-12 19:48
jeramyRR12-Apr-12 19:48 
GeneralRe: Learning C# through exercises Pin
Roger Wright19-Apr-12 8:21
professionalRoger Wright19-Apr-12 8:21 
GeneralRe: Learning C# through exercises Pin
jeramyRR19-Apr-12 8:33
jeramyRR19-Apr-12 8:33 
AnswerRe: Learning C# through exercises Pin
VJ Reddy12-Apr-12 21:03
VJ Reddy12-Apr-12 21:03 
GeneralRe: Learning C# through exercises Pin
dybs13-Apr-12 11:20
dybs13-Apr-12 11:20 
GeneralRe: Learning C# through exercises Pin
VJ Reddy13-Apr-12 13:50
VJ Reddy13-Apr-12 13:50 
QuestionRe: Learning C# through exercises Pin
Anurag Sarkar14-Apr-12 19:52
Anurag Sarkar14-Apr-12 19:52 
AnswerRe: Learning C# through exercises Pin
VJ Reddy14-Apr-12 19:54
VJ Reddy14-Apr-12 19:54 
AnswerRe: Learning C# through exercises Pin
Richard MacCutchan12-Apr-12 21:22
mveRichard MacCutchan12-Apr-12 21:22 
AnswerRe: Learning C# through exercises Pin
V.12-Apr-12 21:47
professionalV.12-Apr-12 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.