PowerTCP Mail for .NET
State Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > SmtpEventArgs Class : State Property




Gets the object that was included as part of the associated method call.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property State As Object
Visual Basic (Usage)Copy Code
Dim instance As SmtpEventArgs
Dim value As Object
 
value = instance.State
C# 
public object State {get;}
Managed Extensions for C++ 
public: __property Object* get_State();
C++/CLI 
public:
property Object^ State {
   Object^ get();
}

Property Value

An object containing data passed into the calling asynchronous method.

Remarks

The EndEventArgs.State property can be used in the calling asynchronous method to make data accessible to the handling event.

This property is useful for making data accessible to the handling event. Since asynchronous methods are "disconnected" (meaning that when one is called, it executes on it's own and returns in the event handler) data that you were using in the code that called the asynchronous method may not be available in the event handler. Simply pass this data in as state when calling the asynchronous method (usually a BeginXXX method) and it is available in the event handler. If you do not wish to make an object accessible in the EndXXX event, simple pass in null as state.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.