mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 04:30:00 +00:00
[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:
12
tests/keyword_test/ABC.cs
Normal file
12
tests/keyword_test/ABC.cs
Normal 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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user