What do you want to save?
Add Code snippet
New code examples in category C#
-
Andrew T. 2021-08-29 19:19:04
how to get a subset of a list in c#
using System; using System.Linq; public class MainClass { public static void Main() { int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int offset = 0; int length = 3; var subArray = array.Skip(offset).Take(length).ToArray(); Console.WriteLine(... Add solution -
Damien Foor 2021-08-29 18:15:02
input string was not in a correct format. c#
//Trying to incorrectly convert a to a type when the string // can not be converted. "5a00" is not a number //use TryParse. Type.TryParse as in Int32.TryParse //or Double.TryParse or decimal.TryParse ... string response = string.Empty; int som... Add solution
Best helpers
Holyeyeolo
+5
Mostafa 36a2
+5
Rodrigorgs
+5
Arnav Bose
+5
Waldrumpus
+5
TheShade
+5
Piquet
+5
Babak
+5
Jeff Sours
+5
Jim Mourgos
+5
J. Marks
+5