title: C# Change the value of a variable in an existing listbox item
body: <p>I have a listbox where the items are a struct. This struct contains two strings. One for the title, and the other one for plain text. Now i want to change the text in a existing item in the listbox. Is there a way to do this without removing the existing and adding the updated version to the list?</p>
  
  <p>This is what i want to do,</p>
  
  <pre><code>((TextItemRecord) listbox1.Items[myListbox1.BeforeIndex]).text = "Blablabla";
  </code></pre>
  
  <p>The compiler says, "Cannot modify the result of an unboxing conversion" when i try to do this. Any solutions?</p>
  
  <p>Struct,</p>
  
  <pre><code>struct TextItemRecord
  {
      public UInt64 address;
      public string name, text;
  
      public TextItemRecord(UInt64 address, string name)
      {
          this.address = address;
          this.name = name;
          this.text = "";
      }
      public override string ToString()
      {
          return name;
      }
  }
  </code></pre>
  
  <p>I'm sorry folks, I have no idea how this site is supposed to work</p>