System.ServiceModel 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.Interface | System.AttributeTargets.All, AllowMultiple=true, Inherited=true)

The is intended for use when creating indigo1 service contracts (interfaces that define the service and its methods). The known types are types that may be present in an object graph when serialization or deserialization occurs. For more information about known types, see Data Contract Known Types.

To use the property, create a class that contains a method (or methods) that returns an array of types (each being a known type). When applying the attribute, set the to the name of a method that returns the list of types and set the to the type that contains the method. The method must return a type that implements the interface. The method must also include a parameter of type .

You can also apply the attribute several times to an interface, class, or method, each time specifying a new known type.

You can use the word ServiceKnownType in your Microsoft Visual Basic or C# code instead of the longer ServiceKnownTypeAttribute.

Specifies known types to be used by a service when serializing or deserializing.

- Constructor
  4.0.0.0

  Use this constructor when applying the to a class that contains methods that return known types.

  Initializes a new instance of the class and specifies the name of a method that returns the known types.

  The name of a method that returns the known types.
- Constructor
  4.0.0.0

  The can be applied several times to a method, with each application naming a different known type that may be present in the object graph returned by the method.

  Initializes a new instance of the class with the specified known type.

  Specifies a known type that can be used in a parameter or return value defined by the service.
- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class with the name of a method that returns the known types and the type that contains the method (or methods) that returns the known types.

  The name of a method that returns the known types.
  The type that can use the known types in its object graph.
- Property
  4.0.0.0
  System.Type To be added. To be added.

  Gets the type that contains the methods that return the known types.

- Property
  4.0.0.0
  System.String To be added.

  The must be the name of a method on the type specified by the property.

  Gets the name of a method that returns the collection of known types.

- Property
  4.0.0.0
  System.Type To be added. To be added.

  The known type that can be included in an object graph.