Skip to content

Instantly share code, notes, and snippets.

@BinToss
Created May 11, 2023 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BinToss/6ed5ab8b71c8e4ff4d5127cbb28e3184 to your computer and use it in GitHub Desktop.
Save BinToss/6ed5ab8b71c8e4ff4d5127cbb28e3184 to your computer and use it in GitHub Desktop.
C# - Can I add items to a readonly list?
#!meta
{"kernelInfo":{"defaultKernelName":"csharp","items":[{"aliases":[],"name":"csharp"}]}}
#!csharp
// You can Add items to readonly lists!
List<uint> luint {get;} = new(){10u};
luint.Add(67u);
luint.Display();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment