Here are the examples of the csharp api class System.Collections.Generic.List.Add((char key, CharNode node)) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
View licenseprivate CharNode<T> Find(string key, int offset, bool add) { if(key.Length == offset) { return this; } if (_children == null) _children = new List<(char, CharNode<T>)>(); var c = key[offset]; var i = _children.FindIndex(t => t.key == c); CharNode<T> n; if (i < 0) { if (add) { n = new CharNode<T>(); _children.Add((c, n)); } else return null; } else { n = _children[i].node; } return n.Find(key, offset + 1, add); }