일부 C# 코드를 VB.NET으로 변환하려고합니다.VB.NET의 이벤트 구독
내가 가지고있는 (작동) C#을
m_switchImageTimer = new DispatcherTimer();
m_switchImageTimer.Interval = Interval;
m_switchImageTimer.Tick += (s, e) => LoadNextImage();
내가 성공적으로 변환하는 데 어려움을 겪고있어 핵심 라인은 다음 사항에 내가 시도 무엇
m_switchImageTimer.Tick += (s, e) => LoadNextImage();
은 다음과 같습니다
m_switchImageTimer.Tick += Function(s, e) LoadNextImage()
m_switchImageTimer.Tick += New EventHandler(AddressOf LoadNextImage)
어느 것도 작동하지 않습니다.)
Error 1 'Public Event Tick(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event
및 LoadNextImage (아래에 강조 표시된 다음 오류 발생 :
는첫 시도 m_switchImageTimer.Tick 이하의 에러, 제 VS2010 하이라이트 생성
가Error 3 Expression does not produce a value.
번째 시도가 생산을 같은 오류 :
Error 1 'Public Event Tick(sender As Object, e As System.EventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.
어떻게 C# 코드를 VB.NET에? VB.NET에서 이벤트를 구독
감사 벤