我将 ac# 类转换为 vb 网络,但有些事件无法找出这些是代表声明:
Public Delegate Sub IndentChangedEventHandler(NewValue As Integer)
Public Delegate Sub MultiIndentChangedEventHandler(LeftIndent As Integer, HangIndent As Integer)
Public Delegate Sub MarginChangedEventHandler(NewValue As Integer)
Public Delegate Sub TabChangedEventHandler(args As TabEventArgs)
Public Event LeftHangingIndentChanging As IndentChangedEventHandler
Public Event LeftIndentChanging As IndentChangedEventHandler
Public Event RightIndentChanging As IndentChangedEventHandler
Public Event BothLeftIndentsChanged As MultiIndentChangedEventHandler
Public Event LeftMarginChanging As MarginChangedEventHandler
Public Event RightMarginChanging As MarginChangedEventHandler
Public Event TabAdded As TabChangedEventHandler
Public Event TabRemoved As TabChangedEventHandler
Public Event TabChanged As TabChangedEventHandler
'这是在vb net上转换的函数
Private Sub AddTab(pos As Single)
Dim rect As New RectangleF(pos, 10.0F, 8.0F, 8.0F)
tabs.Add(rect)
If TabAdded IsNot Nothing Then
TabAdded.Invoke(CreateTabArgs(pos))
End If
End Sub
c# 上的句子是
if (TabAdded != null)
TabAdded.Invoke(CreateTabArgs(pos));
调用代表的正确方法应该是什么?