Some time ago I was shown a method of casting on using a length of contrasting yarn (which you unpicked afterwards) but I can’t remember how to do it. Can anyone help?
That is provisional cast on. It is made with a crochet hook. There are 2 versions that I know of. The first, you crochet a chain in contrasting yarn, then knit into the purl like bumps in the chain. The second, you crochet live stitches directly onto the needle. With either method, you remove the base of contrasting yarn later. And you pickup the stitches & work in the opposite direction.
You should be able to goggle videos of both.
Found some links. Here is the one I use most often. This one crochets the stitches directly onto the needle.
This is the knit in the bump.
And there is a different method under this site’s knitting help videos.
You can also just use a simple cast on in a different color, knit a row, then switch to the regular yarn.
I find the Knitting at Noon one the easiest for me.
There are other types of provisional cast ons besides crocheted ones or even a regular cast on like Sue mentions. So you could have been shown another way, but I think they all work the same and the crocheted ones are easy.