If i have
List<String> text
how can I create a sub-list of all contiguous elements in a certain range, for example.
List<String> subList = /* all elements within text bar the first 2*/
Also are there any helpful helpful tips and tricks that might be helpful?
This will work even without LINQ:
List<String> subList = text.GetRange(2, text.Count - 2);
Edit: Fixed a typo.
subList = text.Skip(2).ToList()
Skip (n) returns an IEnumerable <> with all elements except the first n.
When you really need a list after this, ToList () converts it back.
3.5, . " " : http://msdn.microsoft.com/en-us/library/d9hw1as6.aspx
Source: https://habr.com/ru/post/1702739/More articles:Launch a C # 3 application without installing .Net Framework? - frameworksImport svn branch to git - gitInterface management examples? - designWhy is publication not working in VS2008 without error message? - svnProcessing input data from the phone via SMS - phpXPath Version Search - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1702741/reporting-services-total-and-percentages-for-each-row&usg=ALkJrhjgiPOIABOpyymHIBaLpdFy8OwlfAInsert rows (parent and child elements) programmatically - javaSimpleDB Dialog for NHibernate - amazonMDX: Фильтрация члена, заданного значениями таблицы мер - filterAll Articles