Is this a correct situation to use a constant?
<p>So my professor was giving back some feedback on a project I've been working on. He docked a few marks for this code:</p>

<pre><code>if (comboVendor.SelectedIndex == 0) {
  createVendor cv = new createVendor();
  cv.ShowDialog();
  loadVendors();
}
</code></pre>

<p>This is in a combobox "index changed" handler. It's used when the user wants to create a new vendor, my top option (index 0, that never changes) opens the "Create a new Vendor" dialog. So the content of my combo box ends up looking like this:</p>

<pre><code>Create New Vendor...
Existing Vendor
Existing Vendor 2
Existing Vendor 3
</code></pre>

<p>His problem is with the first line code: </p>

<pre><code>if (comboVendor.SelectedIndex == 0)
</code></pre>

<p>He claims that the 0 should be a constant, and actually docked me marks because of that. He claims I shouldn't use literals in my code at all.</p>

<p>The thing is, I don't understand why I would want to make that code in that situation a constant. That index will never change, nor is it something that you would need to tweak. It seems like a waste of memory to keep a single 0 in memory that's used for a very specific situation and never changes.</p>
