How to display unique (char/numbers) from given array

Explanation - Int array:
  1. int[] num = new int[] { 2, 3, 4, 5, 6, 7, 5, 3, 1, 7, 9, 8, 5, 4 };   
  2. var x = from a in num  
  3. group a by a into g  
  4. where g.Count()==1  
  5. select g;  
  6. foreach (var item in x)  
  7. {  
  8. Console.WriteLine(item.Key);  
  9. }  
Output:
2
6
1
9
8
 
Explanation - Char array:
  1. string str = "thisistestinfile";  
  2. var x = from a in str  
  3. group a by a into g  
  4. where g.Count() == 1  
  5. select g;  
  6. foreach (var item in x)  
  7. {  
  8. Console.WriteLine(item.Key);  
  9. }  
output:
h
n
f
l