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
no its not school homework
I do with .netframework4 and reflection but I want do that with .netframework1 and with out use reflection and Generic
Thanks
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
no its not school homework
I do with .netframework4 and reflection but I want do that with .netframework1 and with out use reflection and Generic
C#:
[/FONT][/COLOR][/B][COLOR=blue][FONT=Consolas]private[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] [/FONT][/COLOR][COLOR=blue][FONT=Consolas]string[/FONT][/COLOR][COLOR=#000000][FONT=Consolas] SerializeStudent(Student student)[/FONT][/COLOR]
{
[COLOR=blue]return[/COLOR] student.Id.ToString() + [COLOR=purple]'[/COLOR][COLOR=purple],'[/COLOR] + student.FirstName + [COLOR=purple]'[/COLOR][COLOR=purple],'[/COLOR] + student.LastName;
}
[COLOR=blue]private[/COLOR] Student DeserializeStudent([COLOR=blue]string[/COLOR][] str)
{
Student student = [COLOR=blue]new[/COLOR] Student();
[COLOR=blue]return[/COLOR] student.Id = [COLOR=navy]5[/COLOR];
[COLOR=#000000][FONT=Consolas] }[/FONT][/COLOR][B][COLOR=#556655][FONT=Segoe UI]
Thanks