Guest User

Untitled

a guest
Jul 19th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public void writeWord()
  2. {
  3.  
  4.  
  5. List<int> founds = new List<int>();
  6.  
  7. for (int i = 0; i < word.Length; i++)
  8. {
  9. if (word[i] == charachter)
  10. {
  11. founds.Add(i);
  12. }
  13. }
  14.  
  15. char[] tempCharArr = tempWord.ToCharArray();
  16. char[] corrCharArra = word.ToCharArray();
  17.  
  18.  
  19. for (int i = 0; i < founds.Count; i++)
  20. {
  21. tempCharArr[founds[i]] = corrCharArra[founds[i]];
  22. }
  23.  
  24.  
  25. tempWord = tempCharArr.ToString();
  26.  
  27. setTempWord(tempWord);
  28. }
Add Comment
Please, Sign In to add comment