I have a dictionary that looks something like this.
test1: 123test2: 456another1: abctest3: 789another2: def
How can I get the number of all elements that start with a “test” in C # framework 3.5?
You can use LINQ extensions in the dictionary so you can:
int count = dict.Count(D=>D.Key.StartsWith("Test"));
Source: https://habr.com/ru/post/1750514/More articles:Лучше макет? - javaПроблемы с sp_addlinkedserver в SQL Server 2000 - sql-server-2008Is "campaign_ $" a bad name for an SQL column? - sqlSelecting a dynamic row has a different meaning if specified in the Where clause - sql-serverКакую версию Notepad ++ я должен использовать? Unicode или ANSI? Я только делаю кодирование веб-дизайна (PHP, CSS и HTML) - notepad++Custom configuration file for vendor configuration - c #Dynamic data - create friendly column names? - asp.netIs there a better approach to minimize html created on an aspx page - c #Asp.Net form validation onkeyup - eventsDependency injection using web services? - dependency-injectionAll Articles