diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 9b1b8553..ba100fc7 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -306,7 +306,12 @@ namespace CppSharp.Generators.CSharp template.Arguments.All(IsValid)) { List args = template.Arguments; - var @class = (Class)template.Template.TemplatedDecl; + var templateDecl = template.Template.TemplatedDecl; + + if (templateDecl is TypeAlias typeAlias) + return typeAlias.Visit(this); + + var @class = templateDecl as Class; TemplateArgument lastArg = args.Last(); TypePrinterResult typePrinterResult = VisitDeclaration(decl); typePrinterResult.NameSuffix.Append($@"<{string.Join(", ",