M
Mark
I'd like to take an instance of a class, and serialize it to a file on my
computer. No security required on the file. Then, I'd like to be able to
unserialize the file later and use the instance again. A quick sample on
how to do this would be grand. A little pseudo code below just to clarify
what type of class I'd like serialize to a file ...
Thanks in advance.
Mark
[Serializable]
public class Person
{
private string _firstName;
public Person(firstName)
{
_firstName = firstName;
}
public string FirstName
{
get { return _firstName; }
}
}
computer. No security required on the file. Then, I'd like to be able to
unserialize the file later and use the instance again. A quick sample on
how to do this would be grand. A little pseudo code below just to clarify
what type of class I'd like serialize to a file ...
Thanks in advance.
Mark
[Serializable]
public class Person
{
private string _firstName;
public Person(firstName)
{
_firstName = firstName;
}
public string FirstName
{
get { return _firstName; }
}
}