NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeBuilder.DefineProperty

Adds a new property to the class, with the given name and property signature.

[Visual Basic]
Public Function DefineProperty( _
   ByVal name As String, _
   ByVal attributes As PropertyAttributes, _
   ByVal returnType As Type, _
   ByVal parameterTypes() As Type, _
   ByVal backingField As FieldBuilder _
) As PropertyBuilder
[C#]
public PropertyBuilder DefineProperty(
   string name,
   PropertyAttributes attributes,
   Type returnType,
   Type[] parameterTypes,
   FieldBuilder backingField
);
[C++]
public: PropertyBuilder* DefineProperty(
   String* name,
   PropertyAttributes attributes,
   Type* returnType,
   Type* parameterTypes[],
   FieldBuilder* backingField
);
[JScript]
public function DefineProperty(
   name : String,
   attributes : PropertyAttributes,
   returnType : Type,
   parameterTypes : Type[],
   backingField : FieldBuilder
) : PropertyBuilder;

Parameters

name
The name of the property.
attributes
The attributes of the property.
returnType
The return type of the property.
parameterTypes
The types of the parameters of the property.
backingField
[To be supplied.]

Return Value

The defined property.

Exceptions

Exception Type Condition
ArgumentNullException if name is a null reference (in Visual Basic Nothing)
InvalidOperationException if the type was previously created using CreateType

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace