Creates a channel of a specified type that is used to send messages to a service endpoint that is configured with a specified binding.
Namespace:
System.ServiceModel
Assembly:
System.ServiceModel (in System.ServiceModel.dll)
Visual Basic (Declaration)
Public Shared Function CreateChannel ( _
binding As Binding, _
endpointAddress As EndpointAddress _
) As TChannel
Dim binding As Binding
Dim endpointAddress As EndpointAddress
Dim returnValue As TChannel
returnValue = ChannelFactory.CreateChannel(binding, _
endpointAddress)
public static TChannel CreateChannel(
Binding binding,
EndpointAddress endpointAddress
)
public:
static TChannel CreateChannel(
Binding^ binding,
EndpointAddress^ endpointAddress
)
public static function CreateChannel(
binding : Binding,
endpointAddress : EndpointAddress
) : TChannel
EndpointAddress address = new EndpointAddress("http://localhost:8000/ChannelApp");
IRequestChannel channel = ChannelFactory<IRequestChannel>.CreateChannel(binding, address);
channel.Open();
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0
Reference