Place half the sugar in a bowl. Add the egg yolks. After adding each egg yolk, mix them using a whisk to prevent them from generating a crust that doesn't dissolve later.
Add the flour and cornstarch/cornflour and whisk together with the yolks.
In a small saucepan, place the milk and mix it with the other half of the sugar, salt and vanilla. Heat it up until it steams; don't let it boil.
While whisking the yolks, add about ¼ of the milk onto them. Whisk vigorously.
Add the rest of the milk and mix. You can now do it more calmly.
Return the mix into the saucepan and heat it up over medium-low heat, mixing all the time. Once it starts to boil, leave it in for a couple of seconds and then remove it from the heat and saucepan to stop the cooking process. If you leave it on the heat or in the saucepan for longer, it could split.
I placed the pastry cream straight into the pastry bag that I was going to use to fill up the tart. You can also place it in a bowl and cover it with plastic or silicone, making sure that it touches the surface of the pastry cream to prevent it from forming a crust where it meets the air.