\makeatletter
\newcounter{example}[section]
\newcommand*\example[1]
  {%
    \par\smallskip
    \refstepcounter{example}%
    \addcontentsline{exs}{example}{#1}%
    \noindent\textit{Example:} \ignorespaces
  }
\newcommand*\l@example{\@dottedtocline{0}{1.5em}{2.3em}}
\newcommand\listofexamples
  {%
    \addsec{List of Examples}%
    \@starttoc{exs}%
  }
\makeatother