A simple typecast will ensure the compiler knows what you mean in this case.
Foo((object)new object[]{ (object)"1", (object)"2" }));
As an array is a subtype of object, this all works out. Bit of an odd solution though, I’ll agree.
More Related Contents:
- C# how to create an array of objects? [closed]
- how to write every element of an array in a line of a textbox C# [closed]
- Convert string[] to Array
- How do I divide an array into separate arrays in C#?
- Reading CSV file and storing values into an array
- Cannot deserialize the JSON array (e.g. [1,2,3]) into type ‘ ‘ because type requires JSON object (e.g. {“name”:”value”}) to deserialize correctly
- Remove element of a regular array
- Array slices in C#
- How do I concatenate two arrays in C#?
- How do I convert a Stream into a byte[] in C#? [duplicate]
- .NET / C# – Convert char[] to string
- How to store int[] array in application Settings
- change array size
- Fast way to convert a two dimensional array to a List ( one dimensional )
- Passing Arrays by Value and by Reference
- How can I print the contents of an array horizontally?
- What is the use of the ArraySegment class?
- Two dimensional array slice in C#
- Does foreach evaluate the array at every iteration?
- Convert array of integers to comma-separated string
- Sorting an array of folder names like Windows Explorer (Numerically and Alphabetically) – VB.NET
- List array duplicates with count
- Converting jagged array to 2D array C#
- Sorting an array related to another array
- How to sort two arrays by same index?
- C# multidimensional arrays iteration
- Converting 2 bytes to Short in C#
- Why is array co-variance considered so horrible?
- byte[] to unsigned BigInteger?
- Byte Array to Bitmap Image