Freigeben über


Context.SetProperty-Methode

Diese Methode unterstützt die .NET Framework-Infrastruktur und ist nicht für die direkte Verwendung in Code bestimmt.

Legt eine bestimmte Kontexteigenschaft nach dem Namen fest.

Namespace: System.Runtime.Remoting.Contexts
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overridable Sub SetProperty ( _
    prop As IContextProperty _
)
'Usage
Dim instance As Context
Dim prop As IContextProperty

instance.SetProperty(prop)
public virtual void SetProperty (
    IContextProperty prop
)
public:
virtual void SetProperty (
    IContextProperty^ prop
)
public void SetProperty (
    IContextProperty prop
)
public function SetProperty (
    prop : IContextProperty
)

Parameter

  • prop
    Die eigentliche Kontexteigenschaft.

Ausnahmen

Ausnahmetyp Bedingung

InvalidOperationException

Es wird versucht, Eigenschaften zum Standardkontext hinzuzufügen.

InvalidOperationException

Der Kontext ist eingefroren.

ArgumentNullException

Die Eigenschaft oder der Eigenschaftenname ist NULL (Nothing in Visual Basic).

Hinweise

Das Hinzufügen von Eigenschaften zum Standardkontext ist nicht zulässig.

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

Context-Klasse
Context-Member
System.Runtime.Remoting.Contexts-Namespace