Platform Core .NET Assemblies API
ConcatIfNotEmpty(IEnumerable<String>,String,Int32) Method
See Also  Send Feedback
Terrasoft.Common Namespace > StringUtilities Class > ConcatIfNotEmpty Method : ConcatIfNotEmpty(IEnumerable<String>,String,Int32) Method
source
List of combined elements.
separator
Delimiter.
maxNumber
Maximum number of elements combined in a string.

Glossary Item Box

Combines the list of specified items to a single string with the specified separator if the items are not empty. The number of combined elements is limited with the following number: maxNumber. If the number of source elements exceeds maxNumber, ‘...’ will be added instead of elements that cannot fit into string.

Syntax

 
C#
 
 

Parameters

source
List of combined elements.
separator
Delimiter.
maxNumber
Maximum number of elements combined in a string.

Return Value

New string that contains source elements that are not empty, listed with the separator separator.

Remarks

Overloaded method.

Extensible method for the classes that implement System.Collections.Generic.IEnumerable`1 interface.

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.