Skip to content

Commit c9a06b5

Browse files
committed
Fix type-safe csharp name for generics with multiple params
1 parent f43c7f9 commit c9a06b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Assets/FullSerializer/Source/Internal/fsTypeExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public static string CSharpName(this Type type) {
2121

2222
public static string CSharpName(this Type type, bool includeNamespace, bool ensureSafeDeclarationName) {
2323
var name = CSharpName(type, includeNamespace);
24-
if (ensureSafeDeclarationName) name = name.Replace('>', '_').Replace('<', '_').Replace('.', '_');
24+
if (ensureSafeDeclarationName)
25+
name = name.Replace('>', '_').Replace('<', '_').Replace('.', '_').Replace(',', '_');
2526
return name;
2627
}
2728

0 commit comments

Comments
 (0)