Hi erkin.headsho...,
Please refer below sample.
Code
C#
static void Main(string[] args)
{
Console.WriteLine("Please enter value");
var values = Console.ReadLine();
char[] uniquValues = values.ToCharArray().Distinct().OrderBy(x => x).ToArray();
foreach (char item in uniquValues)
{
int count = values.ToCharArray().Where(x => x == item).Count();
Console.WriteLine(string.Format("{0} - {1} times.", item, count));
}
Console.Read();
}
VB.Net
Private Sub Main(ByVal args As String())
Console.WriteLine("Please enter value")
Dim values = Console.ReadLine()
Dim uniquValues As Char() = values.ToCharArray().Distinct().OrderBy(Function(x) x).ToArray()
For Each item As Char In uniquValues
Dim count As Integer = values.ToCharArray().Where(Function(x) x = item).Count()
Console.WriteLine(String.Format("{0} - {1} times.", item, count))
Next
Console.Read()
End Sub
Screenshot