Is it possible to remove properties from a dynamic class?

I have a dynamic ActionScript class that is used to send parameters to a WebService. Some of these parameters are always present, so they are public properties of the class:

package
{
    [Bindable]
    public dynamic class WebServiceCriteria
    {
        public var property1:int;

        public var property2:String;

        public var property3:String;

        public var property4:String;
    }
}

But I also add properties at runtime that may change over time:

criteria.runTimeProperty = "1";

I am not very familiar with dynamic classes, so I was wondering if it is possible to “delete” a new property. Say the next time I call WebService, I don’t want this property sent - not even as null. How can I remove it from an instance of a class without creating a new instance each time?

+5
1

, , , :

delete criteria.runTimeProperty;

delete criteria["runTimeProperty"];

.

. delete.

+14

All Articles