If a set contains all accumulation points then it is closed It is a question from my complex analysis courses;

If a set contains all accumulation points then it is closed

Our accumulation point definition is “if a point is an accumulation point of set $S$, every deleted neighborhood of it contains at least one point of $S$”
Our closed set definition is “if a set is closed then it contains all boundary points”
I cannot prove it without contradiction. I need direct proof. I am confused in does accumulation point mean boundary point? I need your helps. Thanks in advance
 A: Let $z$ be a boundary point. By definition it means any neighborhood of $z$ contains points in $S$ and points outside of $S$. So for each $n\in\mathbb{N}$ you can take $z_n\in S$ such that $|z-z_n|<\frac{1}{n}$. Now look at the sequence $z_n$. If $z$ is an element of the sequence then from the way we built the sequence it follows that $z\in S$. If $z$ is not an element of the sequence then it follows that for each $n\in\mathbb{N}$ there is a point $z_n\ne z$ such that $z_n\in S$ and $|z-z_n|<\frac{1}{n}$. But that implies $z$ is an accumulation point of $S$ and hence $z\in S$. So in any case you get $z\in S$. 
If you don't want to use sequences here is another way: if there exists $\epsilon>0$ such that for all $w\in\mathbb{C}$ that satisfy $0<|w-z|<\epsilon$ we have $w\notin S$ then it follows that $z\in S$ because a neighborhood of $z$ still must contain a point of $S$. Otherwise, for all $\epsilon>0$ there exists $w\in S$ such that $0<|w-z|<\epsilon$. But from here it follows that $z$ is an accumulation point and hence $z\in S$. So anyway we get $z\in S$.
A: It's easier to show that the complement of $S$ is open: if $z\in S^c$ then $z$ is not an accumulation point of $S$ (because $S$ has all its accumulation points, by hypothesis). But then there must be an neighborhood $U$ of $z$ such that $U\cap S=\emptyset\Rightarrow U\subseteq S^c$. That is to say, $S^c$ is open. 
