cast dynamic class to static class