From c3bf485502578d347aa4ae1293be7fc82a1482c3 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 9 Apr 2013 00:23:14 +0100 Subject: [PATCH] Use a safe identifier when generating parameter names. --- src/Generator/Generators/CSharp/CSharpTypePrinter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index a0589563..166f6c45 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -308,7 +308,7 @@ namespace Cxxi.Generators.CSharp public string VisitParameter(Parameter arg, bool hasName) { var type = arg.Type.Visit(this, arg.QualifiedType.Qualifiers); - var name = arg.Name; + var name = Helpers.SafeIdentifier(arg.Name); if (hasName && !string.IsNullOrEmpty(name)) return string.Format("{0} {1}", type, name);