T
Any type.
Platform Core .NET Assemblies API
GetElement<T> Method
See Also  Send Feedback
Terrasoft.Common Namespace > ArrayUtilities Class : GetElement<T> Method
source
Array.
index
Index of the array item.
defaultValue
The default value.

Glossary Item Box

Securely returns array element if the index index is within the array boundaries, if the index is outside the array boundaries, then the default defaultValue value is returened.

Syntax

 
C#
 
 

Parameters

source
Array.
index
Index of the array item.
defaultValue
The default value.

Type Parameters

T
Any type.

Return Value

Array element if the index is within the array boundaries, otherwise - default value.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© Terrasoft 2002-2018.