Skip to content

Instantly share code, notes, and snippets.

@dariogriffo
Created June 21, 2023 15:51
Show Gist options
  • Save dariogriffo/ed57d8d63d54c8649d278b65818f8d30 to your computer and use it in GitHub Desktop.
Save dariogriffo/ed57d8d63d54c8649d278b65818f8d30 to your computer and use it in GitHub Desktop.
using System.Text.Json;
List<int> a = new() { 1, 2, 3 };
foreach (var i in a)
{
a.Add(i * 2);
}
Console.WriteLine(JsonSerializer.Serialize(a));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment