Noob question: how to retrieve X Y from pointshape

sofar i have a pretty complex programm but somehow i still cant retrieve the X Y from a layer/shapefile

for now i make extra fields in the shape to add the X and Y and later i retrieve those, but stupidly i can not find a way to retrieve the X and Y from a datatable directly from the originated shape..... any idea on this?