Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why this condition returns true? [duplicate]

Tags:

string

c#

.net

Possible Duplicate:
Why does Enumerable.All return true for an empty sequence?

Code:

var line = "name:";
Console.Write(line.Split(new char[] { ':' })[1].All(char.IsDigit)); 

How it is possible? it should not return false? after: is an empty string.

like image 430
The Mask Avatar asked Oct 31 '11 18:10

The Mask


People also ask

How do I remove duplicate conditions in Excel?

To remove duplicate values, click Data > Data Tools > Remove Duplicates. To highlight unique or duplicate values, use the Conditional Formatting command in the Style group on the Home tab.

How do you find duplicates with True False in Excel?

The duplicate-checking formula uses =COUNTIF to “count” which cells contain data that appears more than once throughout the spreadsheet. Resulting values can either be “TRUE” (indicating duplicate data) or “FALSE” (showing non-duplicate data).

Why is my duplicate values not working?

Trailing or leading spaces Probably the most common cause of Excel not recognizing duplicates. Check if the one cell has trailing, leading or extra spaces in the cell. Excel sees the space as an individual character but humans tend to ignore it.


1 Answers

Enumerable.All

true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.

like image 128
Paul Tyng Avatar answered Oct 21 '22 04:10

Paul Tyng