调用汇编状态为“ Public Sub [Operator]”的函数?

时间:2018-09-16 17:48:29

标签: vb.net dll

我正在处理一个DLL,但在VB.NET中没有任何示例源代码。 程序集告诉我,我想调用的子程序如下所示:

Public Sub [Operator](image As MatrixBase, ByRef detections As IEnumerable(Of RectDetection), Optional threshold As Double = 0)

我想知道我是否真的必须这样称呼它:

 SomeClass.Operator(SomeInput)

“操作员”一词使我感到紧张。

有没有更漂亮的方式做到这一点?

谢谢。

仅供参考,这是DLL的整个程序集:

#Region "Assembly DlibDotNet, Version=19.15.0.0, Culture=neutral, PublicKeyToken=null"
' D:\Dev\Projects\faceshift\faceshift\packages\DlibDotNet.19.15.0.20180916\lib\netstandard2.0\DlibDotNet.dll
#End Region

Imports System.Collections.Generic

Namespace DlibDotNet
    Public NotInheritable Class FrontalFaceDetector
        Inherits DlibObject

        Public Sub [Operator](image As MatrixBase, ByRef detections As IEnumerable(Of RectDetection), Optional threshold As Double = 0)
        Protected Overrides Sub DisposeUnmanaged()

        Public Function [Operator](image As Array2DBase, Optional threshold As Double = 0) As Rectangle()
        Public Function [Operator](image As MatrixBase, Optional threshold As Double = 0) As Rectangle()
    End Class
End Namespace

1 个答案:

答案 0 :(得分:0)

我不知道Operator一词会让您感到紧张的原因,所以我无法解决,但是像其声明一样,您可以使用方括号来调用该方法:

FrontalFaceDetector.[Operator]( ... )

不过,个人而言,没有他们我会更喜欢。