is there a difference between dc capacitor and ac capacitor?

i tried it hard with the shopkeeper to know whether the capacitor is y rated but it seems like he just does not know anything about his products. anyways i brought this 100nf 400v capacitor with no polarity marking, will this work?
image given
model no -100k400