Нет. Попробуйте следующее:
List _searchPatternList = new List();
...
List fileList = new List();
foreach ( string ext in _searchPatternList )
{
foreach ( string subFile in Directory.GetFiles( folderName, ext )
{
fileList.Add( subFile );
}
}
// Sort alpabetically
fileList.Sort();
// Add files to the file browser control
foreach ( string fileName in fileList )
{
...;
}
Взято из: http://blogs.msdn.com/markda/archive/2006/04/20/580075.aspx
Вы можете отфильтровать и отобразить элементы, а также проверить тип и идентификатор, значение которых не равно NaN
.
var idArray = [{ id: 15 }, { id: -1 }, { id: 0 }, { id: 3 }, { id: 12.2 }, {}, { id: null }, { id: NaN }, { id: 'undefined' }],
idFiltered = idArray
.filter(({ id }) => typeof id === 'number' && !isNaN(id))
.map(({ id }) => id);
console.log(idFiltered);