Unable to parse code snippet in roslyn
问题 I'm trying to dynamically build a c# class from small pieces of code. We have a window where a user can enter c# code (valid or not), and we parse these strings into roslyn. I recently found an issue when i was using this : public override IEnumerable<StatementSyntax> GenerateStatements() { var result = new List<StatementSyntax>(); if (!string.IsNullOrWhiteSpace(this.Tag.Code)) { result.Add(SyntaxFactory.ParseStatement(this.Tag.Code)); } return result; } Turns out when compiling in VB, if the