我想知道如何將其轉換爲VB.NET。將這些行從C#轉換爲VB.Net?
private void RaiseStreamVolumeNotification()
{
if (StreamVolume != null)
{
StreamVolume(this, new StreamVolumeEventArgs() { MaxSampleValues = (float[])maxSamples.Clone() });
}
}
public class StreamVolumeEventArgs : EventArgs
{
public float[] MaxSampleValues { get; set; }
}
我試圖使用在線轉換器轉換它,但要麼它失敗,要麼將其轉換不正確。一個轉換器,我認爲是最好的,將其轉換爲:
Public Class StreamVolumeEventArgs
Inherits EventArgs
Private _MaxSampleValues As Single()
Public Property MaxSampleValues() As Single()
Get
Return _MaxSampleValues
End Get
Set(ByVal value As Single())
_MaxSampleValues = value
End Set
End Property
End Class
你試過使用反射器嗎? – David 2009-09-02 16:50:09