Click here to Skip to main content
15,910,083 members
Home / Discussions / C#
   

C#

 
AnswerRe: help Pin
Reanalyse2-Dec-05 21:23
Reanalyse2-Dec-05 21:23 
GeneralRe: help Pin
eyalso2-Dec-05 22:24
eyalso2-Dec-05 22:24 
QuestionUser-reorder ListViewItems by dragging? Pin
wikoh2-Dec-05 5:17
wikoh2-Dec-05 5:17 
QuestionC# out-of-process COM component Pin
london_ste2-Dec-05 4:55
london_ste2-Dec-05 4:55 
Questionwhat is the meaning of "PublicKeyToken=null is not marked as serializable." ? Pin
P. Gnana Prakash2-Dec-05 4:11
P. Gnana Prakash2-Dec-05 4:11 
AnswerRe: what is the meaning of "PublicKeyToken=null is not marked as serializable." ? Pin
[Marc]2-Dec-05 6:26
[Marc]2-Dec-05 6:26 
GeneralRe: what is the meaning of "PublicKeyToken=null is not marked as serializable." ? Pin
P. Gnana Prakash2-Dec-05 18:36
P. Gnana Prakash2-Dec-05 18:36 
QuestionHow to serialize more than one object? Pin
ishlilith2-Dec-05 3:59
ishlilith2-Dec-05 3:59 
Suppose I have 2 multi dimensional arrays that I want to save to the hard drive, but I can only save one or the other, never both.
I have looked for a solution on the web and some books, and if I understood it correctly the code below should work, however it doesnt (maybe because I should use a constructor?).

Any advice besides serializing each array one by one?
Thanks for helping a complete novice.



    [Serializable]<br />
    public class test<br />
    {<br />
<br />
        public static int[,] arrtest = new int[1000, 1000];<br />
        public static int[,]lalala = new int[2000, 1000];<br />
    }<br />
    public class read<br />
    {<br />
        public void doWrite()<br />
        {<br />
            test per = new test(); //is the problem here?<br />
            IFormatter formatter = new BinaryFormatter();<br />
            Stream str = new FileStream("D:\\guardar.dat", FileMode.Create, FileAccess.Write);<br />
             formatter.Serialize(str, per); //or here?<br />
            str.Close();<br />
<br />
        }<br />
    }

AnswerRe: How to serialize more than one object? Pin
mav.northwind3-Dec-05 22:43
mav.northwind3-Dec-05 22:43 
QuestionUsing JPanel on Windows.Forms Pin
sbozcan2-Dec-05 3:49
sbozcan2-Dec-05 3:49 
QuestionHow to write this C code in C#? Pin
bouli2-Dec-05 2:44
bouli2-Dec-05 2:44 
AnswerRe: How to write this C code in C#? Pin
Alvaro Mendez2-Dec-05 3:29
Alvaro Mendez2-Dec-05 3:29 
GeneralRe: How to write this C code in C#? Pin
bouli2-Dec-05 3:55
bouli2-Dec-05 3:55 
AnswerRe: How to write this C code in C#? Pin
User 66582-Dec-05 4:07
User 66582-Dec-05 4:07 
GeneralRe: How to write this C code in C#? Pin
bouli2-Dec-05 4:11
bouli2-Dec-05 4:11 
AnswerRe: How to write this C code in C#? Pin
mcljava2-Dec-05 7:07
mcljava2-Dec-05 7:07 
GeneralRe: How to write this C code in C#? Pin
bouli2-Dec-05 9:24
bouli2-Dec-05 9:24 
QuestionMarshal an array of fixed length strings Pin
mintguy2-Dec-05 2:35
mintguy2-Dec-05 2:35 
QuestionDispose the parent form as soon as the child opens? Pin
MudkiSekhon2-Dec-05 1:45
MudkiSekhon2-Dec-05 1:45 
AnswerRe: Dispose the parent form as soon as the child opens? Pin
Dave Kreskowiak2-Dec-05 7:35
mveDave Kreskowiak2-Dec-05 7:35 
GeneralRe: Dispose the parent form as soon as the child opens? Pin
MudkiSekhon2-Dec-05 17:52
MudkiSekhon2-Dec-05 17:52 
GeneralRe: Dispose the parent form as soon as the child opens? Pin
Dave Kreskowiak4-Dec-05 6:00
mveDave Kreskowiak4-Dec-05 6:00 
QuestionColors? Pin
thomasa2-Dec-05 1:37
thomasa2-Dec-05 1:37 
AnswerRe: Colors? Pin
Maqsood Ahmed2-Dec-05 2:07
Maqsood Ahmed2-Dec-05 2:07 
AnswerRe: Colors? Pin
User 66582-Dec-05 3:37
User 66582-Dec-05 3:37 

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.