diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 08690e4d..b39c7fef 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -2034,9 +2034,8 @@ namespace CppSharp.Generators.CSharp { var identifier = SafeIdentifier(function.Name);; - var method = function as Method; - if (method != null && method.IsOperator) - identifier = "Operator" + method.OperatorKind.ToString(); + if (function.IsOperator) + identifier = "Operator" + function.OperatorKind.ToString(); var overloads = function.Namespace.GetFunctionOverloads(function) .ToList();