InvalidComObjectException Konstruktory
Definice
Inicializuje instanci InvalidComObjectException
třídy.Initializes an instance of the InvalidComObjectException
class.
Přetížení
InvalidComObjectException() |
Inicializuje instanci |
InvalidComObjectException(String) |
Inicializuje instanci |
InvalidComObjectException(SerializationInfo, StreamingContext) |
Inicializuje novou instanci |
InvalidComObjectException(String, Exception) |
Inicializuje novou instanci třídy InvalidComObjectException třídy pomocí zadané chybové zprávy a odkazu na vnitřní výjimku, která je příčinou této výjimky.Initializes a new instance of the InvalidComObjectException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
InvalidComObjectException()
Inicializuje instanci InvalidComObjectException
s výchozími vlastnostmi.Initializes an instance of the InvalidComObjectException
with default properties.
public:
InvalidComObjectException();
public InvalidComObjectException ();
Public Sub New ()
Poznámky
InvalidComObjectException
dědí z SystemException.InvalidComObjectException
inherits from SystemException. Tento konstruktor nastaví vlastnosti Exception objektu, jak je znázorněno v následující tabulce.This constructor sets the properties of the Exception object as shown in the following table.
Typ vlastnostiProperty Type | ValueValue |
---|---|
InnerException | null .null . |
Message | Lokalizovaný řetězec chybové zprávy.A localized error message string. |
InvalidComObjectException(String)
Inicializuje instanci InvalidComObjectException
se zprávou.Initializes an instance of the InvalidComObjectException
with a message.
public:
InvalidComObjectException(System::String ^ message);
public InvalidComObjectException (string message);
new System.Runtime.InteropServices.InvalidComObjectException : string -> System.Runtime.InteropServices.InvalidComObjectException
Public Sub New (message As String)
Parametry
- message
- String
Zpráva, která označuje důvod výjimky.The message that indicates the reason for the exception.
Poznámky
InvalidComObjectException
dědí z SystemException.InvalidComObjectException
inherits from SystemException. Tento konstruktor nastaví vlastnosti Exception objektu, jak je znázorněno v následující tabulce.This constructor sets the properties of the Exception object as shown in the following table.
Typ vlastnostiProperty Type | ValueValue |
---|---|
InnerException | null .null . |
Message | message |
InvalidComObjectException(SerializationInfo, StreamingContext)
Inicializuje novou instanci COMException
třídy z dat serializace.Initializes a new instance of the COMException
class from serialization data.
protected:
InvalidComObjectException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidComObjectException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.InteropServices.InvalidComObjectException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.InvalidComObjectException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Parametry
- info
- SerializationInfo
Objekt, který uchovává serializovaná data objektu.The object that holds the serialized object data.
- context
- StreamingContext
Kontextové informace o zdroji nebo cíliThe contextual information about the source or destination.
Výjimky
info
je null
.info
is null
.
Poznámky
Tento konstruktor je volán během deserializaci k rekonstrukci objektu výjimky přenášeného prostřednictvím toku.This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. Další informace naleznete v tématu System.Runtime.Serialization.For more information, see System.Runtime.Serialization.
InvalidComObjectException
dědí z SystemException.InvalidComObjectException
inherits from SystemException.
InvalidComObjectException(String, Exception)
Inicializuje novou instanci třídy InvalidComObjectException třídy pomocí zadané chybové zprávy a odkazu na vnitřní výjimku, která je příčinou této výjimky.Initializes a new instance of the InvalidComObjectException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public:
InvalidComObjectException(System::String ^ message, Exception ^ inner);
public InvalidComObjectException (string message, Exception inner);
new System.Runtime.InteropServices.InvalidComObjectException : string * Exception -> System.Runtime.InteropServices.InvalidComObjectException
Public Sub New (message As String, inner As Exception)
Parametry
- message
- String
Chybová zpráva, která vysvětluje důvod výjimky.The error message that explains the reason for the exception.
- inner
- Exception
Výjimka, která je příčinou aktuální výjimky.The exception that is the cause of the current exception. Pokud parametr není, aktuální výjimka je vyvolána v catch
bloku, který zpracovává vnitřní výjimku. null
inner
If the inner
parameter is not null
, the current exception is raised in a catch
block that handles the inner exception.
Poznámky
Výjimka, která je vyvolána v přímém důsledku předchozí výjimky by měla obsahovat odkaz na předchozí výjimku ve InnerException vlastnost.An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. Vlastnost vrací stejnou hodnotu, která je předána do konstruktoru, nebo null
Pokud InnerException vlastnost neposkytuje vnitřní hodnotu výjimky konstruktoru. InnerExceptionThe InnerException property returns the same value that is passed into the constructor, or null
if the InnerException property does not supply the inner exception value to the constructor.
Následující tabulka ukazuje počáteční hodnoty vlastností pro instanci InvalidComObjectException.The following table shows the initial property values for an instance of InvalidComObjectException.
VlastnostProperty | HodnotaValue |
---|---|
InnerException | Odkaz na vnitřní výjimku.The inner exception reference. |
Message | Řetězec chybové zprávy.The error message string. |