Skip to content

MethodInfoExtensions.GetCSharpOperator Method ​

Definition ​

Returns the relevant CSharpOperator value if the specified method is a C# operator; null otherwise.

c#
public static CSharpOperator? GetCSharpOperator(this MethodInfo method);

View source

Parameters ​

NameTypeDescription
methodMethodInfoThe method.

Returns ​

CSharpOperator?

A CSharpOperator value if the specified method is a C# operator; null otherwise.

Remarks ​

Checks if the method is public, static, its name matches one of the operator method names and that the method has the correct signature.