List custom post types in metabox

Is there a function to list all custom post types in a metabox?

I have

wp_list_pages( $args );

to list the pages in metabox but now I need also to list all custom post types.

Thanks for advices

Solutions Collecting From Web of "List custom post types in metabox"

<?php

   $args = array(
  'public'   => true,
    '_builtin' => false
 );

 $output = 'names'; // names or objects, note names is the default
  $operator = 'and'; // 'and' or 'or'

 $post_types = get_post_types( $args, $output, $operator ); 

 foreach ( $post_types  as $post_type ) {

     echo '<p>' . $post_type . '</p>';
 }

?>

It will list of all public custom post types and you can read documentation on get_post_types here .