Throw Handled Exception
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="135" Width="300">
<StackPanel>
<Button x:Name="btnThrowHandledException" Click="btnThrowHandledException_Click" Content="Throw Handled Exception" Margin="10,10,10,5" />
</StackPanel>
</Window>
//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.ComponentModel
Namespace WpfApplication1
Public Partial Class Window1
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub btnThrowHandledException_Click(sender As Object, e As RoutedEventArgs)
Try
Throw New NotImplementedException()
Catch ex As NotImplementedException
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
End Namespace
Related examples in the same category