C# finding a certain condition of a object via a dictionary -


Currently I'm using this method to determine if a character is online:

  public bool online bicycler (string username) {foreach (character c.charts.wols in it) {if (c! = Null & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; )) {Return; }         }         return false; }  

Is there a faster way to do this?

Actually there is not a quick way to do this, if you put the letter as a dictionary value Want to To be sorted out, a linear o (n) search must be done.


Comments

Popular posts from this blog

iphone - How do I make a UIPickerView in a UIActionSheet -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -