for (int i = 0; i < linklList.Count; i++) { String c = linklList[i].Text; textBox1.AppendText("Позиция № " + (i + 1).ToString() + "\r\n"); } 

How to properly write to

  • linklList.Count
  • linklList[i].Text

instead of linklList, the value from textBox1.Text ?

    1 answer 1

     Dictionary<string, LinklList> lookup = new Dictionary<string, LinklList>(); lookup["a"] = new LinklList(); lookup["b"] = new LinklList(); ... if (lookup.ContainsKey(textBox1.Text)) { LinklList list = lookup[textBox1.Text]; for (int i = 0; i < list.Count; i++) { String c = list[i].Text; textBox1.AppendText("Позиция № " + (i + 1).ToString() + "\r\n"); } } 
    • Gives the error "The linklList" couldn’t be found (using the directive or an assembly reference?). See. Screen prntscr.com/dl6dpt . Thanks for the reply - koverflow
    • The error seems to be removed, but something does not work. The code looks like this. See codeshare.io/5wgXR5 - koverflow