The Wayback Machine - https://web.archive.org/web/20220505200528/https://github.com/topics/csharp-sourcegenerator
Skip to content
#

csharp-sourcegenerator

Here are 111 public repositories matching this topic...

kzu
kzu commented Jul 16, 2021

In some limited scenarios, it might be worth switching to static readonly properties (perhaps backed by the private constant) so that updates to the library providing the ThisAssembly don't require recompiling callers in order to get the updated values (since consts are embedded raw in the callsite at compile-time).

This might not be so common since ThisAssembly is (by default) internal and (m

enhancement good first issue
dzmitry-lahoda
dzmitry-lahoda commented Jan 23, 2022
  1. readonly is (was) slower in runtime in .net for sure.
  2. C# is more like Rust, than Haskell. so mutable structs are OK. as soon as they are not shared across threads, and they are not as these are copy only. so it is safe and better design to make value mutable and allow more patterns of code to work.
  3. sure, validate on set.
good first issue

Improve this page

Add a description, image, and links to the csharp-sourcegenerator topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the csharp-sourcegenerator topic, visit your repo's landing page and select "manage topics."

Learn more