You could do something like this (not tested):
public List<CharactersOnline> charactersOnline = new List<CharactersOnline>();
var characterOnline = new CharactersOnline{connectionId = 1, characterId = 2, characterName = "test"}; //creates a new instance of your object
charactersOnline.Add(characterOnline); //adds the single new instance of your object to the list
solved Add records to List