CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2013

    serialize & Deserialize entities without using Generics & Reflection?

    I have 2 entities (student, course) that I want to serialize & deserialize without using Generic & Reflection.

    This would be in a project three layers and using .NET 1.0.

    Any ideas?

    I do Serialization/Deserialization methods in both class but there is a error in Deserialize error:cannot convert expression type int to return type MyApp_Common.Student

    So... manually implement Serialization/Deserialization methods in both class

    no its not school homework

    I do with .Net Framework 4 and reflection but I want do that with .Net Framework 1 and with out use reflection and Generic

    private string SerializeStudent(Student student)
            return student.Id.ToString() + ',' + student.FirstName + ',' + student.LastName;
        private Student DeserializeStudent(string[] str)
            Student student = new Student();
            return student.Id = 5;

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: serialize & Deserialize entities without using Generics & Reflection?

    Why use .net 1.0? Why torture yourself? Btw, you don't need generics or reflection to serialize - instead use the XmlSerializer.
    Last edited by Arjay; December 25th, 2013 at 08:29 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.