Horje
Count the Number of Duplicate Characters Code Example
Count the Number of Duplicate Characters
using System.Linq;

public class Program
{
    public static int DuplicateCount(string str)
    {
			return str.ToCharArray()
				.GroupBy(x => x)
				.Where(x => x.Count() > 1)
				.Count();
    }
}
Source: edabit.com




Csharp

Related
C# setting property values through reflection with attributes Code Example C# setting property values through reflection with attributes Code Example
add row and columns to grid wpf in code Code Example add row and columns to grid wpf in code Code Example
get position of gameobject unity Code Example get position of gameobject unity Code Example
c# lambdas Code Example c# lambdas Code Example
C# linq mselect Code Example C# linq mselect Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10