Thanks for the reply. I've got it working now, not sure why my testing example didn't work.

What i was trying was just an example while i was figuring out relevent classes etc. then i encountered the error and thought i was doing something fundamentally wrong. I realise i can't do typeof(char) since i dont' know what 'char' will be.

Thanks again.