Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

Obsolete Attribute

Class

System.ObsoleteAttribute

Applies To

Class, Struct, Enum, Constructor, Method, Property, Field, Event, Interface, and Delegate (all program elements except parameters and return values)

Constructors

New([message[, error]])

message (optional; String)

Provides relevant information concerning the obsolete element, including possible workarounds.

error (optional; Boolean)

Indicates whether the compiler generates an error if the program element is used. If omitted, the value defaults to False.

Properties

IsError (Boolean)

Read-only. Value from the error constructor parameter.

Message (String)

Read-only. Value from the message constructor parameter.

Description

The <Obsolete> attribute indicates that the program element is obsolete and no longer valid for use.

Категории