[Mono-dev] serialization of structured data in ArrayList

mirek Miroslav.Binas at cnl.tuke.sk
Sun Dec 18 09:33:05 EST 2005


hello

i try to use serialization for storing of configuration in my app. the 
problem is, i've got some data stored in ArrayList, and they are not 
primitive types - they are instances of classes or some structs. so it 
looks like this:

  [Serializable]
  public class Entry
  {
     public string type;
     public int price;
   }

  [Serializable]
  public class CConfiguration
  {
     ...
     public ArrayList vehicle;
     ...
   }

   // in my app...
   Entry e = new Entry();
   e.type = "truck";
   e.price = 200;

   vehicle.Add( e );

but it doesnt work. how can i do that?

thanks.

mirek

-- 
e-mail: mirek at host.sk
icq: 113397932
jabber: mirek_b at jabber.sk
homepage: http://www.intrak.sk/~binas

english:
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

slovak:
prosim, neposielajte mi prilohy vo formatoch .doc a .ppt (power point)
precitajte si http://www.fsf.org/philosophy/no-word-attachments.cs.html




More information about the Mono-devel-list mailing list