Click here to Skip to main content
15,905,867 members
Home / Discussions / C#
   

C#

 
QuestionRecommendations: Compact Framework Charting Pin
eggie528-Aug-06 11:31
eggie528-Aug-06 11:31 
QuestionSerialization problem Pin
-Yoyosh-28-Aug-06 10:26
-Yoyosh-28-Aug-06 10:26 
AnswerRe: Serialization problem Pin
Stefan Troschuetz28-Aug-06 12:11
Stefan Troschuetz28-Aug-06 12:11 
GeneralRe: Serialization problem [modified] Pin
-Yoyosh-28-Aug-06 13:07
-Yoyosh-28-Aug-06 13:07 
GeneralRe: Serialization problem Pin
AB777128-Aug-06 19:45
AB777128-Aug-06 19:45 
GeneralRe: Serialization problem Pin
-Yoyosh-29-Aug-06 0:42
-Yoyosh-29-Aug-06 0:42 
GeneralRe: Serialization problem Pin
AB777129-Aug-06 1:04
AB777129-Aug-06 1:04 
GeneralRe: Serialization problem [modified] Pin
-Yoyosh-29-Aug-06 7:49
-Yoyosh-29-Aug-06 7:49 
Sure,

this is class, which object`s are kept in array/arraylist:

    [Serializable]<br />
    public class DataGridRow<br />
    {<br />
        public int Time;<br />
        public float Speed;<br />
<br />
        public DataGridRow(int t, float s)<br />
        {<br />
            Time = t;<br />
            Speed = s;<br />
        }<br />
<br />
        public DataGridRow()<br />
        {<br />
<br />
        }<br />
    }


And this is part of other class, that performs serialization:

        /// <summary><br />
        /// Keeps objects of type DataGridRow<br />
        /// </summary><br />
        ArrayList RouteData = new ArrayList();<br />
<br />
(...)<br />
<br />
        public void Serialize()<br />
        {<br />
            DataGridRow[] dgr = new DataGridRow[RouteData.Count];<br />
           <br />
            for (int i = 0; i < RouteData.Count; i++)<br />
            {<br />
                dgr[i] = (DataGridRow)RouteData[i];<br />
            }<br />
<br />
            XmlSerializer a = new XmlSerializer(dgr.GetType());<br />
<br />
            StreamWriter sw = new StreamWriter(@"c:/aaa.txt");<br />
            a.Serialize(sw, RouteData);<br />
        }


Please let me know if I missed something

(I may send it to you if you like)
GeneralRe: Serialization problem Pin
AB777129-Aug-06 18:09
AB777129-Aug-06 18:09 
GeneralRe: Serialization problem Pin
-Yoyosh-30-Aug-06 0:19
-Yoyosh-30-Aug-06 0:19 
GeneralRe: Serialization problem Pin
AB777130-Aug-06 0:25
AB777130-Aug-06 0:25 
GeneralRe: Serialization problem Pin
AB777130-Aug-06 1:27
AB777130-Aug-06 1:27 
GeneralRe: Serialization problem Pin
AB777130-Aug-06 1:29
AB777130-Aug-06 1:29 
GeneralRe: Serialization problem Pin
-Yoyosh-31-Aug-06 0:28
-Yoyosh-31-Aug-06 0:28 
GeneralRe: Serialization problem Pin
AB777131-Aug-06 0:58
AB777131-Aug-06 0:58 
GeneralRe: Serialization problem Pin
AB777131-Aug-06 1:29
AB777131-Aug-06 1:29 
GeneralRe: Serialization problem Pin
-Yoyosh-31-Aug-06 7:40
-Yoyosh-31-Aug-06 7:40 
Question.netmodule Pin
waheed awan28-Aug-06 10:03
waheed awan28-Aug-06 10:03 
AnswerRe: .netmodule Pin
Judah Gabriel Himango28-Aug-06 12:37
sponsorJudah Gabriel Himango28-Aug-06 12:37 
Questionhow to access a non-static method from another object? Pin
michal.kreslik28-Aug-06 9:44
michal.kreslik28-Aug-06 9:44 
AnswerRe: how to access a non-static method from another object? Pin
numbers1thru928-Aug-06 9:52
numbers1thru928-Aug-06 9:52 
AnswerRe: how to access a non-static method from another object? Pin
likefood28-Aug-06 10:01
likefood28-Aug-06 10:01 
AnswerRe: how to access a non-static method from another object? [modified] Pin
michal.kreslik28-Aug-06 10:16
michal.kreslik28-Aug-06 10:16 
GeneralRe: how to access a non-static method from another object? Pin
Judah Gabriel Himango28-Aug-06 12:50
sponsorJudah Gabriel Himango28-Aug-06 12:50 
QuestionRegarding Final Year Project Pin
Muhammad Chitrali28-Aug-06 9:12
Muhammad Chitrali28-Aug-06 9:12 

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.