Your database can generate the sequential IDs for you.
Create an ID column in your database (I am guessing you are using MS SQL because you stated only C#).
Set Identity column
to true on the ID column
Set Autoincrement
to true on the ID column
The ID column value will be created automatically based on existing items in the database and you will get a sequence 1,2,3,.. for your student IDs. This column can also become the primary key for your Students table.
Learn about auto increment columns for different RDMBSes here.