# Way to step thru properties of static class?

**URL:** <https://forum.kirupa.com/t/way-to-step-thru-properties-of-static-class/269074>\
**Category:** Uncategorized\
**Created:** [August 22, 2008, 6:34am UTC](https://forum.kirupa.com/t/way-to-step-thru-properties-of-static-class/269074 "2008-08-22T06:34:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![squirrelyCode](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@squirrelyCode](https://forum.kirupa.com/u/squirrelyCode)\
**Post date:** [August 22, 2008, 6:34am UTC](https://forum.kirupa.com/t/way-to-step-thru-properties-of-static-class/269074/1 "2008-08-22T06:34:14Z")

</div>

Hi,  
I have defined a class with a lot of properties (about 30). There are a number of simple methods I need to write (eg clone, copy values of all properties from one instance to another, reset values of an instance, etc).

For example

package {  
[Bindable]  
public class Person{  
public var Var1:int;  
public var Var2:int;  
public var Var3:String;  
…  
public var VarN:Boolean;

```
public static function copyInto(src:Person,dest:Person): void {
  dest.Var1 = src.Var1;
 .....
  dest.VarN = src.VarN;

```

}  
}  
}

Instead of doing lots of assignments. I’d rather do something like  
for each property p in Person  
dest.p = src.p

I think this can be done for dynamic classes, but what about static classes?

Thanks!
