Your own Object Expired Exception : Exception Yours « Development « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Development » Exception YoursScreenshots 
Your own Object Expired Exception
Your own Object Expired Exception

Imports System
Imports System.Collections

Public Class MainClass
    
    Shared Sub Main(ByVal args As String())
        Try
            Throw New ObjectExpiredException("This object has expired.")
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        End Try

    End Sub

End Class

Public Class ObjectExpiredException
    Inherits System.ApplicationException
    ' No parameters. Use a default message.
    Public Sub New()
        MyBase.New("This object has expired")
    End Sub
    ' Set the message.
    Public Sub New(ByVal new_message As String)
        MyBase.New(new_message)
    End Sub
    ' Set the message and inner exception.
    Public Sub New(ByVal new_message As String, ByVal inner_exception As Exception)
        MyBase.New(new_message, inner_exception)
    End Sub
End Class
           
       
Related examples in the same category
1.Your own Exception ClassYour own Exception Class
2.A user-defined exception classA user-defined exception class
3.Define and Use your own Exception ClassDefine and Use your own Exception Class
w__ww__._ja_v_a2_s__.___c___om | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.