How to get a data member default value using Source Generator?

Viewed 179

About the C# 9 new feature named Source Generator, how to get a property default value?

For example:

class MyClass
{
    public int MyValue { get; set; } = 1;
}

How to get the 1 defined at compile time?

0 Answers
Related