Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ContractType Property

ContractDescription.ContractType Property

Gets or sets the contract type that the contract description specifies.

Namespace:  System.ServiceModel.Description
Assemblies:   System.ServiceModel.Primitives (in System.ServiceModel.Primitives.dll)
  System.ServiceModel (in System.ServiceModel.dll)

public Type ContractType { get; set; }

Property Value

Type: System.Type
The Type of contract that the contract description specifies.

The ContractType property is not serializable, so it is only available when the description is bound to runtime. It cannot be imported or exported as part of the metadata.

Type contractType = cd.ContractType;
Console.WriteLine("\tContract type: {0}", contractType.ToString());

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft