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.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.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
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.