title: How to make a distinct list of integers from a list of objects?
body: <p>I have a list of objects, each object has property <code>total</code>.</p>
  
  <p>i need to create a new <code>List&lt;int&gt;</code> from the above list. the problem is if two objects have <code>total</code>=4, the <code>List&lt;int&gt;</code> should only contain one '4'.</p>
  
  <p>let my list be:</p>
  
  <pre><code>[
      {name: "vishnu" , total: 10},
      {name: "vishnu2", total: 11},
      {name: "vishnu3", total: 15},
      {name: "vishnu4", total: 10}
  ]
  </code></pre>
  
  <p>so in my list of integers the output should be:</p>
  
  <blockquote>
    <p>10,11,15</p>
  </blockquote>
  
  <p>and not: </p>
  
  <blockquote>
    <p>10,11,15,10</p>
  </blockquote>