Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb49784

Browse files
authored
Merge pull requestsegmentio#5221 from segmentio/niall/csharp_array
Add array info for CSharp
2 parents45ff3db +eb5e566 commitcb49784

File tree

1 file changed

+12
-0
lines changed
  • src/connections/sources/catalog/libraries/server/csharp

1 file changed

+12
-0
lines changed

‎src/connections/sources/catalog/libraries/server/csharp/index.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,18 @@ The `reset` method clears the SDK’s internal stores for the current user and g
323323
analytics.Reset()
324324
```
325325

326+
## Arrays
327+
Tosendanarrayasaneventproperty,referencethe [GitHubrepo](https://github.com/segmentio/Serialization.NET/blob/main/Tests/JsonUtilityTest.cs#L24){:target="_blank"}. Below is an example of code you can implement to send an array of strings:
328+
329+
```c#
330+
List<string>listOfStrings=newList<string> {"test1","test2","test3" };
331+
332+
JsonObjectcustomerJsonObj=newJsonObject
333+
{
334+
["event_name"]=newJsonArray(listOfStrings.ConvertAll(o=> (JsonElement)o))
335+
};
336+
```
337+
326338
## Compatibility
327339
Thislibrarytargets `.NETStandard2.0`.Seethe [listofcompatibleplatforms](https://docs.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0){:target="_blank"}.
328340

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp