Since you want to be able to get through both, you will need two dictionaries.
Assuming the Student type is a reference type, you will still only have one Student object for each student, so don't worry about that.
It is best to wrap dictionaries in one object:
public class StudentDictionary { private readonly Dictionary<int, Student> _byId = new Dictionary<int, Student>(); private readonly Dictionary<string, Student> _byUsername = new Dictionary<string, Student>();
And so on.
source share