PowerSNMP for .NET
Marshal(String,Object) Method




Message to pass into the UserState event.
Object to pass to the UserState event; can be null.
Marshals a string and/or object to the UI thread and raises the UserState event.
Syntax
Public Overloads Sub Marshal( _
   ByVal message As String, _
   ByVal state As Object _
) 
Dim instance As ComponentBase
Dim message As String
Dim state As Object
 
instance.Marshal(message, state)
public void Marshal( 
   string message,
   object state
)
public: void Marshal( 
   string* message,
   Object* state
) 
public:
void Marshal( 
   String^ message,
   Object^ state
) 

Parameters

message
Message to pass into the UserState event.
state
Object to pass to the UserState event; can be null.
Remarks

Used to marshal a string and/or object from a worker thread to the UI thread for typical display purposes. It calls OnUserState, which raises the UserState event.

See the SynchronizingObject property for information on updating UI controls in your event handler. Internally, SynchronizingObject.BeginInvoke is used to marshal data when the SynchronizingObject is not null, and Delegate.DynamicInvoke is used when SynchronizingObject is null. This method is provided for convenience; the developer may use alternative methods for marshaling data as required.

See Also

Reference

ComponentBase Class
ComponentBase Members
Overload List

6.1.1.2
PowerSNMP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic