c# - Update existing value in an ObservableCollection -


I'm trying to update & amp; Add value for an overview

I have defined the observablecollection like this;

  Public Supervision column & lt; Tupal & lt; String, int & gt; & Gt; Logsamura {get; Set; }   

In my class, I am subscribing to an event that has a string in the string: A, B, C, D, E or F.

If the string I received is already present in the archive, I only want to update the second item (int) which is the string of the characters I received.

If I write this code

  logsamuri.ad (new tupal; string; at & g; (_ stringFromEvent, intValue));   

This will only add a new row to the collection, before I use LogSummary.Add (), I need to know how the string already exists And if it should do the current int, and update it instead of adding a new row to the collection.

Hope you understand my problem! Thanks in advance, Jack

  var current = logsamuri First and default (t => item 1 == _stringFromEvent) if (Existing! = Faucet) {// Update logsmuri [Logsamuri. Index (Existing)] = New Tuple & Strat, Int & gt; (Existing. Item 1, interview); } And {// insert new}    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -