목록과 관련된 질문을 제외하고는 이미 비슷한 질문을 던졌지 만 여기서 회원은 사전을 사용하도록 권장 했으므로 그렇게하기로했습니다. 다음은 원래 링크입니다.사전의 특정 위치에 요소 추가하기
Adding a value to a specific location in a list of queues
그래서 나는 사전에 특정 위치에 새로운 프로세스를 추가하려고 해요. 이 문제가 발생
rr_dict[Int32.Parse(priority_add_textbox.Text)].Add(new process {
Proc_Id = sjf_queue.Size + 1,
Proc_BurstTime = Int32.Parse(time_add_texbox.Text),
Proc_Priority = Int32.Parse(priority_add_textbox.Text)
});
, 나는 오류가 발생 :
An unhandled exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in mscorlib.dll
Additional information: The given key was not present in the dictionary.
사람이 내가해야 할 일을 알고 있나요?
나는 당신이 단순히 개체를 넣으려는 사전을 말할 수 없다고 생각합니다. – Gandarez