Suppose that $X\subset \mathbb C^n$ is a subvariety (locally given by holomorphic equations) and $f: X\to \mathbb C$ is a function. Suppose that $f$ is
1) continuous,
2) holomorphic on the smooth part of $X$.
Is it true that for any $x\in X$ there exists an open subset $x\in U\subset \mathbb C^n$ and a holomorphic function $F: U\to \mathbb C$ such that $f|_{U\cap X} = F|_{U\cap X}$?
If not, will it be true if in addition $X$ is locally irreducible?