下面顯示的相應MouseDown事件(C#)的等效vb.net代碼是什麼?我應該如何在vb.net中實現這個事件?Vb.net相當於C#
謝謝你在前進,Goicox
var model = new PlotModel("MouseDown HitTestResult", "Reports the index of the nearest point.");
var s1 = new LineSeries();
s1.Points.Add(new DataPoint(0, 10));
s1.Points.Add(new DataPoint(10, 40));
s1.Points.Add(new DataPoint(40, 20));
s1.Points.Add(new DataPoint(60, 30));
model.Series.Add(s1);
s1.MouseDown += (s, e) =>
{
model.Subtitle = "Index of nearest point in LineSeries: " + Math.Round(e.HitTestResult.Index);
model.InvalidatePlot(false);
};
標題很有趣。 –
使用redgate反射器將代碼從CLR語言轉換爲VB/C#/ C++,反之亦然。 http://www.red-gate.com/products/dotnet-development/reflector/ – ApolloSoftware
該事件在.NET代碼中定義,C#和VB都建立在.NET代碼之上。該事件將存在於VB中具有相同名稱的同一個類。 – Servy