S
Stephen Lamb
How would one do the following at runtime? I'm really interested in steps 2
and 3.
1. Read data from somewhere that describes types and instances.
2. Construct new types from data.
3. Construct instances of types from data.
3. Use new types and instances in a type safe manner.
e.g.
1. Read data from somewhere that describes types and instances.
Create a type that is a struct called Foo with members E1 and E2 that are 32
bit ints.
Construct a Foo with E1 = 23 and E2 = 5.
2. Construct new types from data.
public struct Foo
{
public Int32 E1;
public Int32 E2;
}
3. Construct instances of types from data.
Foo foo = new Foo();
foo.E1 = 23;
foo.E2 = 5;
4. Use new types and instances in a type safe manner.
foo.E1 = 23;
Thanks,
Steve
and 3.
1. Read data from somewhere that describes types and instances.
2. Construct new types from data.
3. Construct instances of types from data.
3. Use new types and instances in a type safe manner.
e.g.
1. Read data from somewhere that describes types and instances.
Create a type that is a struct called Foo with members E1 and E2 that are 32
bit ints.
Construct a Foo with E1 = 23 and E2 = 5.
2. Construct new types from data.
public struct Foo
{
public Int32 E1;
public Int32 E2;
}
3. Construct instances of types from data.
Foo foo = new Foo();
foo.E1 = 23;
foo.E2 = 5;
4. Use new types and instances in a type safe manner.
foo.E1 = 23;
Thanks,
Steve