/*public static TypeDeclaration type(this CompilationUnit compilationUnit, string typeToFind)
         * {
         *  foreach (var type in compilationUnit.types())
         *      if (type.Name == typeToFind)
         *          return type;
         *  return null;
         * }*/

        public static TypeDeclaration type(this NamespaceDeclaration namespaceDeclaration, string typeToFind)
        {
            foreach (var type in namespaceDeclaration.types())
            {
                if (type.Name == typeToFind)
                {
                    return(type);
                }
            }
            return(null);
        }