In a saucepan, bring the milk to a simmer. Meanwhile, in a medium bowl, stir together the sugar, cornstarch and salt. Gradually add the hot milk to the sugar mixture, whisking constantly until smooth. Pour the mixture back into the saucepan, and cook over medium heat, stirring constantly, until the mixture boils and thickens. Whisk in the egg yolks, then cook, stirring constantly until the mixture thickens slightly. Remove from heat, then stir in butter and vanilla and mix well. Strain through a fine mesh strainer or sieve if desired. Refrigerate until cooled.