fc8fe9fd 5ace 887d 51ea 2605a9cc4d1f - akesseler/Plexdata.Utilities.Templates GitHub Wiki

ArgumentExtension.ExpandArguments Method

Tries to expand every sub-array contained in arguments.

Namespace: Plexdata.Utilities.Formatting.Extensions
Assembly: Plexdata.Utilities.Templates (in Plexdata.Utilities.Templates.dll) Version: 1.0.0

Syntax

C#

public static Object[] ExpandArguments(
	this Object[] arguments
)

Parameters

 

arguments
Type: System.Object[]
The source array to be expanded.

Return Value

Type: Object[]
An expanded array of objects or an empty array if parameter arguments does not contain any item.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method tries to expand every sub-array contained in arguments.

Examples

Here are some examples of what kind of input will be expanded to results.  

  • Something like empty is expanded to [].
  • Something like null is expanded to [null].
  • Something like null, null is expanded to [null, null].
  • Something like 1, "arg", false is expanded to [1, "arg", false].
  • Something like new[] { 1, 2, 3 } is expanded to [1, 2, 3].
  • Something like new[] { "arg1", "arg2" } is expanded to ["arg1", "arg2"].
  • Something like true, new[] { "arg1", "arg2" } is expanded to [true, arg1", "arg2].
  • Something like 42, new[] { "arg1", "arg2" }, true, new[] { 1, 2 }, "arg3" is expanded to [42, "arg1", "arg2", true, 1, 2, "arg3"].

See Also

Reference

ArgumentExtension Class
Plexdata.Utilities.Formatting.Extensions Namespace
ArgumentExtension.CanExpand(Object)

⚠️ **GitHub.com Fallback** ⚠️