There are two basic ways to do this task:
1) Generate a random number.
1a) Check if it is in the list.
1b) If it is, repeat from (1)
or
2) Generate a list of numbers between 1 and 300 in a List (call it availableNumbers)
2a) Remove all numbers in the Student list from availableNumbers (or don't add them in the first place)
2b) When you want a student number, generate a random number for 0 to availableNumbers.Length - 1
2c) Use this number as an index into availableNumbers. This gives you the random number you want.
2d) Remove the number from availableNumbers.
The first is simpler to code, but can take a lot of time - and the chances of a long time increase as the number of used numbers increases. It does not have any initial one-of setup time cost.
The second if slightly harder to code, but is consistent in how long it takes to provide a number. There is a one-off cost to set up the availableNumbers list in the first place.
Neither of these need the sledgehammer that is Linq.