The Importance of Being Earnest act 1 (1895). The same lines appear, as a dialogue between Lord Illingworth and Mrs. Allonby, in A Woman of No Importance, act 2 (1893).
Oscar Wilde, Russell Jackson, Ian Small (2000). “The Complete Works of Oscar Wilde: De profundis, "Epistola : in carcere et vinculis"”, p.100, Oxford University Press on Demand
The Picture of Dorian Gray ch. 4 (1891). In Wilde's play LadyWindermere's Fan, act 3 (1892), Lord Darlington replies to the question "What is a cynic?": "A man who knows the price of everything and the value of nothing."