fc8fe9fd 5ace 887d 51ea 2605a9cc4d1f - akesseler/Plexdata.Utilities.Templates GitHub Wiki
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
C#
public static Object[] ExpandArguments(
this Object[] arguments
)
- arguments
- Type: System.Object[]
The source array to be expanded.
Type: Object[]
An expanded array of objects or an empty array if parameter arguments does not contain any item.
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).
This method tries to expand every sub-array contained in arguments.
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"]
.
ArgumentExtension Class
Plexdata.Utilities.Formatting.Extensions Namespace
ArgumentExtension.CanExpand(Object)