Navigation: X# Documentation > Getting Started with X# > New language features
ASTYPE
We have added a new keyword that allows you to cast a value to a type with type, just like the C# "as" keyword:
FUNCTION Test (oVar as ParentClass) LOCAL oChild := oVar ASTYPE ChildClass IF (oChild != NULL_OBJECT) DoSomething() ENDIF