A
Arjen
Hi there,
I have tried to run some samples without succes.
So I have made a new sample. Maybe someone can fix the serialization?
The class "MyProgram" must be saved to an xml file and placed back in the
program with the "open" call.
Hope someone can do something for me.
Thanks,
Arjen
// -------------------------------------------------------------------------
using System;
using System.Collections;
namespace MyProgram {
class MyProgram {
public static Hashtable Persons = new Hashtable();
[STAThread]
static void Main(string[] args) {
Open();
DoSomeThing();
Save();
}
static public void DoSomeThing() {
// New object
Person person = new Person("James", 12);
// Add to the hashtable
Persons.Add( person.GetHashCode(), person);
}
static void Open() {
// Read the serialization
}
static void Save() {
// Save the serialization
}
}
class Person {
string _name;
int _age;
public Person( string name, int age) {
_name = name;
_age = age;
}
}
}
I have tried to run some samples without succes.
So I have made a new sample. Maybe someone can fix the serialization?
The class "MyProgram" must be saved to an xml file and placed back in the
program with the "open" call.
Hope someone can do something for me.
Thanks,
Arjen
// -------------------------------------------------------------------------
using System;
using System.Collections;
namespace MyProgram {
class MyProgram {
public static Hashtable Persons = new Hashtable();
[STAThread]
static void Main(string[] args) {
Open();
DoSomeThing();
Save();
}
static public void DoSomeThing() {
// New object
Person person = new Person("James", 12);
// Add to the hashtable
Persons.Add( person.GetHashCode(), person);
}
static void Open() {
// Read the serialization
}
static void Save() {
// Save the serialization
}
}
class Person {
string _name;
int _age;
public Person( string name, int age) {
_name = name;
_age = age;
}
}
}