Object Oriented Programming using C#

(backadmin) #1
Object Oriented Programming using C#
Generic Collections and how to Serialize them

•    With one line the collection ‘b’ is serialised and in doing so all account objects inside this collection are
serialized (see code below).

bFormatter.Serialize(outFile, b);

•    In order to prove this has worked a new, empty Bank object is created ‘b2’.
• The de-serialization process is invoked and the output cast into a Bank type. The results are then stored in
the object ‘b2’ (see code below).

b2 = (Bank)bFormatter.Deserialize(inFile);

Finally the contents of ‘b2’ are displayed to show they are consistent with the data originally created.



 
  


In Paris or Online
International programs taught by professors and professionals from all over the world
BBA in Global Business
MBA in International Management / International Marketing
DBA in International Business / International Management
MA in International Education
MA in Cross-Cultural Communication
MA in Foreign Languages
Innovative – Practical – Flexible – Affordable
Visit: http://www.HorizonsUniversity.org
Write: [email protected]
Call: 01.42.77.20.66 http://www.HorizonsUniversity.org

Please click the advert

Free download pdf