To say y=f(x)+C is a solution to the differential equation means:
dxd{f(x)+C}Since y=f(x) is a solution, we know dxd{f(x)}=xf(x). Also, dxd{f(x)+C}=dxd{f(x)}. So, dxd{f(x)+C}=xf(x).xf(x)0=x(f(x)+C)=x(f(x)+C)=xC
Our equation should hold for all x in our domain, and for the derivative to y with respect to x to make sense, our domain should not be a single point. So, there is some x in our domain such that x=0. Therefore, the C must be zero. So, f(x)+C is not a solution to the differential equation for any constant C.
When we're finding a general antiderivative, we add “+C" at the end. When we're finding a general solution to a differential equation, the “+C" gets added when we antidifferentiate–we don't add another one at the end of our work.