# Get variables declared in class

**URL:** <https://forum.kirupa.com/t/get-variables-declared-in-class/318056>\
**Category:** flash\
**Created:** [January 9, 2011, 6:01pm UTC](https://forum.kirupa.com/t/get-variables-declared-in-class/318056 "2011-01-09T18:01:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [January 9, 2011, 6:01pm UTC](https://forum.kirupa.com/t/get-variables-declared-in-class/318056/1 "2011-01-09T18:01:24Z")

</div>

hey.  
I have a question regarding classes ( new to them).:shh:  
I have a class that extends an object, and have declared some variables in the class code:

```auto

package {
	
	public class myclass extends Object {
		public var _test = "yey";
		public function myclass() {
			// constructor code
		}

	}
}

```

How could i get the default value of the var \_test?  
If i try to trace directly with the class as the pointer, i get syntax error:

```auto

trace(myclass._test);

```

Any ideas? Thanks!:genius:
