0
我可以很容易地在C#中做到這一點......但我需要在VB.Net中的等價物。我需要能夠在VB.Net中實現各種IAsyncResult屬性。vb.net實現IAsyncResult.AsyncState
在C#
作品就像一個冠軍......
public object AsyncState { get; set; }
在VB.NET - 失敗
失敗的原因,你不能超載VB中的一個屬性。網
Public ReadOnly Property AsyncState() As Object Implements IAsyncResult.AsyncState
Get
'... the GET's code goes here ...
End Get
End Property
Public WriteOnly Property AsyncState() As Object
Set(ByVal value As Object)
'... the SET's code goes here ...
End Set
End Property
在VB.NET - 這兩個失敗
這失敗 「必須實現IAsyncResult的」 要求
Public AsyncState As Object
Public AsyncState As Object Implements IAsyncResult.AsyncState