2 Reusable Code Snippet Topics
Remove Filter
|
|
Short snippet on how you could remove all occurrences of a char from a string using LINQ. |
|
[CODE] int[][] jaggedArray = (from line in File.ReadAllLines(fileName).Skip(1) select (from item in line.Split('\t').Skip(1) select int.Parse(item)).ToArray()).ToArray(); [/CODE] This is a crazy example. It was sparked by what is probably a homework thread on another forum here, but it is basically reading in a tab-delimitted text file, stripping out the first row … |
The End.