Creating multiple variable storage

Well, I work in C#, and I’m trying to make a system that everytime you tap a key, it would be recorded in a playerprefs and that would make a sequence of keys like you did, that would be assigned to a certain time I’ve named with the variable seconds.
The thing I’m trying to do is something like a variable storage, something like when you press a key, it would assign to a variable “example” the seconds that have passed, but it would be an undefined number of keys that I can’t control with multiple example variables like example[1,2,3…], so, is there anyway to make an “example[i+1] = seconds” ? With that I think I could get something like I wanted at first, an storage that assign you seconds to multiplevariables that would be created in the moment.

Kinda sounds like some kind of record for playback function you want to implement. You could use a List of floats to store the time.

Alternatively you can make a Class which holds the variables of what key was pressed and what time was assigned to it and then make a list of that instead.

e,g

List<Recorder> myRecords = new List<Recorder>();

Where Recorder is a class which has 2 variables in it, one for the key that was pressed and the other for the time in seconds.