Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
AnswerRe: Form.Size Width to be less than 123 px.! Pin
Luc Pattyn6-Aug-07 7:12
sitebuilderLuc Pattyn6-Aug-07 7:12 
AnswerRe: Form.Size Width to be less than 123 px.! Pin
PhilDanger6-Aug-07 7:15
PhilDanger6-Aug-07 7:15 
Questioncalling unmanaged c++ dll from c# Pin
djdjoko6-Aug-07 6:50
djdjoko6-Aug-07 6:50 
AnswerRe: calling unmanaged c++ dll from c# Pin
Luc Pattyn6-Aug-07 7:14
sitebuilderLuc Pattyn6-Aug-07 7:14 
AnswerRe: calling unmanaged c++ dll from c# Pin
djdjoko6-Aug-07 22:02
djdjoko6-Aug-07 22:02 
GeneralRe: calling unmanaged c++ dll from c# Pin
djdjoko6-Aug-07 22:03
djdjoko6-Aug-07 22:03 
QuestionObject Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 6:25
Spyder_Snyper6-Aug-07 6:25 
AnswerRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 8:38
Hessam Jalali6-Aug-07 8:38 
all Arrays including ArrayList are marked as Serializable So to serialize them just create your formatter and put your array as the object which must be serialized and for Deserializing that Get the object and cast it to ArrayList or your Array (just like the Article)

//Serializing ArrayList
            ArrayList arr = new ArrayList();

            arr.Add(1);
            arr.Add(2);
            arr.Add("Hello");
            arr.Add(new Bitmap(100, 100));

            System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();

            System.IO.MemoryStream ms=new System.IO.MemoryStream();

            bf.Serialize(ms, arr);


//Deserializing the arr to arr2

            bf.Serialize(ms, arr);

            System.IO.Stream newMS = new System.IO.MemoryStream(ms.ToArray());

            ArrayList arr2 = bf.Deserialize(newMS) as ArrayList;


//Serializing Array

            int[] myIntArr = new int[] { 1, 2, 3, 4, 5 };

            System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();

            System.IO.MemoryStream ms=new System.IO.MemoryStream();

            bf.Serialize(ms, myIntArr);


//Deserializing Array

            System.IO.Stream newMS = new System.IO.MemoryStream(ms.ToArray());

            int[] myIntArr2= (int[])bf.Deserialize(newMS);

GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 8:57
Spyder_Snyper6-Aug-07 8:57 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 9:20
Hessam Jalali6-Aug-07 9:20 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 9:23
Spyder_Snyper6-Aug-07 9:23 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 9:34
Hessam Jalali6-Aug-07 9:34 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper6-Aug-07 9:43
Spyder_Snyper6-Aug-07 9:43 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 9:49
Hessam Jalali6-Aug-07 9:49 
GeneralRe: Object Serialization with an ArrayList [modified] Pin
Spyder_Snyper6-Aug-07 10:36
Spyder_Snyper6-Aug-07 10:36 
GeneralRe: Object Serialization with an ArrayList Pin
cyn86-Aug-07 20:17
cyn86-Aug-07 20:17 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali6-Aug-07 21:25
Hessam Jalali6-Aug-07 21:25 
GeneralRe: Object Serialization with an ArrayList Pin
Spyder_Snyper7-Aug-07 4:39
Spyder_Snyper7-Aug-07 4:39 
GeneralRe: Object Serialization with an ArrayList Pin
Hessam Jalali7-Aug-07 6:43
Hessam Jalali7-Aug-07 6:43 
QuestionCannot generate SSPI context error Pin
xbiplav6-Aug-07 5:17
xbiplav6-Aug-07 5:17 
AnswerRe: Cannot generate SSPI context error Pin
snorkie6-Aug-07 11:49
professionalsnorkie6-Aug-07 11:49 
AnswerRe: Cannot generate SSPI context error Pin
mav.northwind7-Aug-07 1:18
mav.northwind7-Aug-07 1:18 
QuestionFile Encoding Pin
Sean_B6-Aug-07 4:22
Sean_B6-Aug-07 4:22 
AnswerRe: File Encoding Pin
Luc Pattyn6-Aug-07 4:37
sitebuilderLuc Pattyn6-Aug-07 4:37 
GeneralRe: File Encoding Pin
Sean_B6-Aug-07 5:26
Sean_B6-Aug-07 5:26 

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.