Getting Texture2D Texel color

Can you give me the full code of getting texture color pixel please?
I stuck with the function parameters, and ue keep crashing