That's pretty nasty. You can do it, but it's not a good idea as a general rule unless the actual makeup of the structure is unavailable to you are design time, but the instance is at run time.
You need to play with Reflection to do this:
FieldInfo[] fi = typeof(MyStruct).GetFields(BindingFlags.Public | BindingFlags.Instance);
foreach (FieldInfo info in fi)
{
Console.WriteLine(info.Name);
}
That will give you the names of the fields within the structure, and you can use those (again with Reflection) to give you the values of the actual instance. But it really isn't a good idea unless you really, really have to - as a solution to save you typing it's a sledgehammer to crack a nut! :laugh: