Pay attention to the following built-in code:
string.Join(",", context.Request.Headers.ToArray())
If the header structure above was Dictionary(string, string)
, the code above would return the following:
[MyHeaderKey1, MyHeaderVal1],[MyHeaderKey2, MyHeaderVal2]
However, the value Dictionary
is equal string[]
, so instead, the output is:
[MyHeaderKey1, System.String[]],[MyHeaderKey2, System.String[]]
I need to be able to generate output as an example of the first code, but against Dictionary
c string[]
. This is normal if I take only the first element of the value Dictionary
- string[]
. Can this be done using inline C #?
source
share