Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# find element by condition

int[] plantHeights = { 3, 6, 4, 1, 6, 8 };

// Find the first occurence of a plant height that is greater
// than 5 inches
int firstHeight = Array.Find(plantHeights, height => height>5);
 
PREVIOUS NEXT
Tagged: #find #element #condition
ADD COMMENT
Topic
Name
8+4 =