问题描述
我是编程新手.
调试时出现以下错误消息.我附上了XAML代码.您能帮忙更正代码吗?
错误:
------------------------------------------------
I am new to programming.
I have the following error message while debugging. I am enclosing the XAML codes. Can you please help in correcting the code?
Error:
------------------------------------------------
System.NotImplementedException was unhandled
Message=The method or operation is not implemented.
Source=Login
StackTrace:
at Login.MainMenu.Show() in F:\VS Project\EDU 1\Login\Login\MainMenu.vb:line 4
at Login.Login.btnLogin_click(Object sender, RoutedEventArgs e) in F:\VS Project\EDU 1\Login\Login\Login.xaml.vb:line 16
-----------------------------------------------
MainMenu.vb
------------------------------------------------
-----------------------------------------------
MainMenu.vb
------------------------------------------------
Public Class MainMenu
Sub Show()
Throw New NotImplementedException
End Sub
End Class
---------------------------------------------
login.xaml.vb
--------------------------------------------
---------------------------------------------
login.xaml.vb
--------------------------------------------
Class Login
Private Sub Window_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
Dim LoginDataSet As Global.Login.LoginDataSet = CType(Me.FindResource("LoginDataSet"), Global.Login.LoginDataSet)
'Load data into the table Login_Master. You can modify this code as needed.
' Dim LoginDataSetLogin_MasterTableAdapter As Global.Login.LoginDataSetTableAdapters.Login_MasterTableAdapter = New Global.Login.LoginDataSetTableAdapters.Login_MasterTableAdapter()
' LoginDataSetLogin_MasterTableAdapter.Fill(LoginDataSet.Login_Master)
' Dim Login_MasterViewSource As System.Windows.Data.CollectionViewSource = CType(Me.FindResource("Login_MasterViewSource"), System.Windows.Data.CollectionViewSource)
' Login_MasterViewSource.View.MoveCurrentToFirst()
End Sub
'Private Sub MainMenu_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnLogin.Click
Private Sub btnLogin_click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnLogin.Click
Dim newMenu As New MainMenu
newMenu.Show()
End Sub
End Class
-------------------------------------------------- -------------
---------------------------------------------------------------
推荐答案
Sub Show()
Throw New NotImplementedException
End Sub
尝试根据您的要求修改潜水艇.
一些链接:
-抛出语句(Visual Basic) [ ^ ]
-尝试...捕获...最终声明(Visual Basic) [ ^ ]
-异常处理任务(Visual Basic) [ ^ ]
Try modifying the sub as per your requirements.
Some links:
- Throw Statement (Visual Basic)[^]
- Try...Catch...Finally Statement (Visual Basic)[^]
- Exception Handling Tasks (Visual Basic)[^]
NotImplementedException使用默认的Equals实现,该实现支持引用相等.有关NotImplementedException实例的初始值的列表,请参见NotImplementedException构造函数.
NotImplementedException uses the default Equals implementation, which supports reference equality. For a list of initial values for an instance of NotImplementedException, see the NotImplementedException constructors.
更多信息:
NotImeplementedException类 [ ^ ]
NotImplementedException构造函数 [ ^ ]
More at:
NotImeplementedException Class[^]
NotImplementedException Constructor[^]
这篇关于VS中的Exceltion处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!