ITypeInfo.CreateMember(String, Type) Method
Dynamically adds a new member to the current type at run time.
Namespace: DevExpress.ExpressApp.DC
Assembly: DevExpress.ExpressApp.v25.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Parameters
Name | Type | Description |
---|---|---|
memberName | String | A string that holds the new member’s name. |
memberType | Type | A Type object that represents the type of the new member. |
Returns
Type | Description |
---|---|
IMemberInfo | An IMemberInfo object that supplies metadata on the created member. |
Remarks
ITypeInfo typeInfo1 = typesInfo.FindTypeInfo(typeof(PersistentObject1));
IMemberInfo memberInfo0 = typeInfo1.FindMember("NewIntField");
if (memberInfo0 == null) {
typeInfo1.CreateMember("NewIntField", typeof(int));
}
// ...
typesInfo.RefreshInfo(typeof(PersistentObject1));
See Also