Create object with 5 point constructor and access a listbox
<p>I have a public class that contains code for my 5 point constructor:   </p>

<pre><code>public LibraryBook( string title, string author, string publisher,
         int year, string number)
    {
    }
</code></pre>

<p>The parts of the constructor, e.x. <code>string title</code>, are properties within that class but they have to have a private set-accessor so that it can't be updated after being created. Basically I can't use a parameterless constructor to create an empty object to use.</p>

<p>This is what my professor wants from me:</p>

<blockquote>
  <p>Instead, you'll have to pull all the data you need from the form's
  text boxes first(done) and then construct the LibraryBook object using
  those values(done). There is only one constructor in the LibraryBook
  class and it requires that you pass the title, author, copyright year,
  etc. as arguments.Once the book has been created, you may add it to
  the form's list of books and its title to the form's list box.</p>
</blockquote>

<p>This is what I have in my form's class which is all inside of a private event handler not sure if it should be in a method so I can access it in another event handler because I have a button That needs to display details of the <code>ListBox</code>, and I can't figure out how to reference it and get it to display. </p>

<pre><code>List&lt;LibraryBook&gt; booklist = new List&lt;LibraryBook&gt;();

string titles;
titles = titleTextBox.Text;

LibraryBook book = new LibraryBook(titles, authors, publishers, years, numbers);

booklist.Add(book);

booksListBox.Items.Add(titles);
</code></pre>
