如何讀取文字檔內的指定行數?(編號:6625)

例如: test.txt 的內容如下:
test1
test2
test3
test4
我想讀取 test.txt 的第三行, 並把字串放到一個變數中, 如何做?
Thank you!!