[C#] Handle keywords (#6775)

* Handle keywords in C#

C# should handle keywords similarly to other languages by appending an underscore after the keyword.

* Fix clang-format for idl_gen_csharp.cpp

* Fix spacing clang-format issue
This commit is contained in:
Todd Hansen
2021-08-16 13:09:21 -05:00
committed by GitHub
parent 2ca5f0e72b
commit 067dce6e79
10 changed files with 393 additions and 64 deletions

12
tests/keyword_test/ABC.cs Normal file
View File

@@ -0,0 +1,12 @@
// <auto-generated>
// automatically generated by the FlatBuffers compiler, do not modify
// </auto-generated>
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum ABC : int
{
void_ = 0,
where = 1,
stackalloc_ = 2,
};