title: How to get a unique object reference as a string for items in a list
body: <p>I'm working on a .NET phone application where I have a list of items in memory that are displayed to the user.  When the user clicks on an item in the user interface, they'll be brought to the "details" view for that item in a second view.  I'm currently using an identity property in my class to reference unique items in the list, but I'm wondering if there is a better way.</p>
  
  <p>I'm using <code>System.Windows.Navigation</code>to set up <code>UriMappings</code> like so:</p>
  
  <pre><code>&lt;nav:UriMapping Uri="/Items/{itemId}" 
                  MappedUri="/Views/Items.xaml?itemId={itemID}" /&gt;
  </code></pre>
  
  <p>I then use the <code>NavigationService</code> to navigate like so:</p>
  
  <pre><code>NavigationService.Navigate(new Uri("/Items/" + item.id.ToString(),
                                     UriKind.Relative));
  </code></pre>
  
  <p>All of this works great, but I don't know that I like needing to include an identity column for my <code>Item</code> class just so that can have a unique string identifer to pass in to the <code>MappedUri</code> query string.  My user interface control that shows the list gives me the underlying <code>Item</code> object in the <code>SelectionChanged</code> event, so I'm wondering if there's a way to "match" that <code>Item</code> object with a unique string value to its corresponding reference in the list.  If I could provide a simple object reference to the navigation service, this would be easy, but I'm not sure how to do it with a string value.  Is this what <code>GetHashCode()</code> is for, and if so, how do I use it correctly?</p>