public string getLetterBitStream(Histo root, char Letter) { string Result = ""; if (root != null) { for (int i = 0; i < root.nextstates.Count; i++) { Result += root.Transition; string Temp = getLetterBitStream((Histo)root.nextstates[i], Letter); if (Temp != "") { Result += Temp; break; } else if (Result != "") { Result = Result.Substring(0, Result.Length - 1); } } if (Letter == root.Key[0] && root.Key != "Node") { return(root.Transition); } else { return(Result); } } else { return(""); } }