Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
Generalcalculate area of an image Pin
chathuraka27-Jan-05 4:11
chathuraka27-Jan-05 4:11 
GeneralCatching PowerPoint when she falls Pin
Esmo200027-Jan-05 3:55
Esmo200027-Jan-05 3:55 
GeneralRe: Catching PowerPoint when she falls Pin
Heath Stewart27-Jan-05 9:51
protectorHeath Stewart27-Jan-05 9:51 
GeneralRe: Catching PowerPoint when she falls Pin
Esmo200027-Jan-05 10:40
Esmo200027-Jan-05 10:40 
GeneralRe: Catching PowerPoint when she falls Pin
Heath Stewart27-Jan-05 12:04
protectorHeath Stewart27-Jan-05 12:04 
GeneralRe: Catching PowerPoint when she falls Pin
Esmo200031-Jan-05 8:20
Esmo200031-Jan-05 8:20 
GeneralRe: Catching PowerPoint when she falls Pin
Heath Stewart31-Jan-05 9:33
protectorHeath Stewart31-Jan-05 9:33 
QuestionSerialize an Array with ISerializable? Pin
huckfinn27-Jan-05 3:18
huckfinn27-Jan-05 3:18 
Hi!

I am trying to serialize a class that contains a list of objects. Here's the situation:

<br />
[Serializable()]<br />
class A: ISerializable{<br />
    ArrayList m_aList;//Contains objects of type B<br />
    //... methods to fill array with object B<br />
<br />
    public A(){}<br />
<br />
    public A(SerializationInfo info, StreamingContext ctxt)<br />
    {<br />
        //***Need to serialize the list of objects B here!!<br />
    }<br />
    public void GetObjectData(SerializationInfo info, <br />
                              StreamingContext ctxt) <br />
    {<br />
        //***How can I unserialize the list here?<br />
    }<br />
}<br />
<br />
class B{<br />
    string m_sName;<br />
    public string Name{ <br />
        get{return m_sName;} <br />
        set{m_sName = value;}<br />
    }<br />
    public B(){}<br />
}<br />


So I need a way to serialize and unserialize the list of objects B contained in A. Normally, B would be a more complicated class with the serialization capabilities too.

Thanks!

Huck
AnswerRe: Serialize an Array with ISerializable? Pin
Heath Stewart27-Jan-05 9:59
protectorHeath Stewart27-Jan-05 9:59 
Generaltrouble deleting records from my sql server Pin
tadhg8827-Jan-05 3:17
tadhg8827-Jan-05 3:17 
GeneralRe: trouble deleting records from my sql server Pin
Mazdak28-Jan-05 0:53
Mazdak28-Jan-05 0:53 
GeneralRe: Time Validation in C# Pin
Mazdak27-Jan-05 2:01
Mazdak27-Jan-05 2:01 
GeneralRe: Time Validation in C# Pin
itssuk27-Jan-05 3:01
itssuk27-Jan-05 3:01 
GeneralTime Validation in C# Pin
itssuk27-Jan-05 1:17
itssuk27-Jan-05 1:17 
GeneralNeed help with C# to C++ DLL interaction Pin
lms00727-Jan-05 0:55
lms00727-Jan-05 0:55 
GeneralRe: Need help with C# to C++ DLL interaction Pin
lms00727-Jan-05 1:53
lms00727-Jan-05 1:53 
GeneralRe: Need help with C# to C++ DLL interaction Pin
lms00727-Jan-05 2:17
lms00727-Jan-05 2:17 
GeneralNo overload for method Pin
nikneem200526-Jan-05 23:15
nikneem200526-Jan-05 23:15 
GeneralRe: No overload for method Pin
Stefan Troschuetz26-Jan-05 23:39
Stefan Troschuetz26-Jan-05 23:39 
GeneralRe: No overload for method Pin
J4amieC27-Jan-05 0:08
J4amieC27-Jan-05 0:08 
GeneralRe: No overload for method Pin
nikneem200527-Jan-05 0:19
nikneem200527-Jan-05 0:19 
GeneralRe: No overload for method Pin
J4amieC27-Jan-05 0:03
J4amieC27-Jan-05 0:03 
GeneralSecurity error - windows custom control Pin
26-Jan-05 23:00
suss26-Jan-05 23:00 
GeneralConnection pooling in windows.net Pin
sapnabn26-Jan-05 22:59
sapnabn26-Jan-05 22:59 
GeneralRe: Connection pooling in windows.net Pin
Member 37818926-Jan-05 23:07
Member 37818926-Jan-05 23:07 

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.