Roslyn : - SyntaxFactory.InitializerExpression
If you're getting exception using SyntaxFactory.InitializerExpression, that's because you need to pair it with one and only one 'Kind' ....
SyntaxFactory.InitializerExpression(SyntaxKind.ObjectInitializerExpression);
Comments