LogicalMethodInfo.IsBeginMethod Method (MethodInfo)

 

Returns a value indicating whether the method passed in represents a Begin method of an asynchronous invocation.

Namespace:   System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)

Public Shared Function IsBeginMethod (
	methodInfo As MethodInfo
) As Boolean

Parameters

methodInfo
Type: System.Reflection.MethodInfo

The MethodInfo that might be a Begin method of an asynchronous invocation.

Return Value

Type: System.Boolean

true if the methodInfo parameter is a Begin method of an asynchronous invocation; otherwise, false.


' Get the type for the proxy class MyMath Web service.
' Note: The MyMath class is a proxy class generated by the Wsdl.exe 
' utility for the Math Web service. This class can also be found in 
' the SoapHttpClientProtocol Class example. 
Dim myType As Type = GetType(MyMath.MyMath)

Dim myBeginMethod As MethodInfo = myType.GetMethod("BeginAdd")
Dim myEndMethod As MethodInfo = myType.GetMethod("EndAdd")
Dim myMethod As MethodInfo = myType.GetMethod("Add")

Console.WriteLine(("Is 'BeginAdd' a Begin Method : " & _
   LogicalMethodInfo.IsBeginMethod(myBeginMethod).ToString()))
Console.WriteLine(("Is 'Add' a Begin Method : " & _
   LogicalMethodInfo.IsBeginMethod(myMethod).ToString()))
Console.WriteLine(("Is 'EndAdd' an End Method : " & _
   LogicalMethodInfo.IsEndMethod(myEndMethod).ToString()))

.NET Framework
Available since 1.1
Return to top
Show: