-
December 25th, 2013, 07:06 AM
#1
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
Code:
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;
}
Thanks
-
December 25th, 2013, 09:27 PM
#2
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 09: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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|