WebDAV .NET Class Library
WebDAV .NET Class Library
WebDAV .NET
Independentsoft.Webdav
Resource Class
Resource Methods
ChangeProperty Method
ChangeProperty Method (Property[], Property[])
ChangeProperty Method (Property[], PropertyName[])
ChangeProperty Method (String, Property[], Property[])
ChangeProperty Method (String, Property[], PropertyName[])

# Resource ChangeProperty Method (String, Property , PropertyName )

Sets (adds) and removes properties to/from a resource.

Namespace: Independentsoft.Webdav
Assembly: Independentsoft.Webdav (in Independentsoft.Webdav.dll) Version: 1.0.700.18437
Syntax
C#
VB
Copy

    public MultiStatus ChangeProperty(
    	string address,
    	Property[] addProperty,
    	PropertyName[] removeProperty
    )

    Public Function ChangeProperty (
    	address As String,
    	addProperty As Property(),
    	removeProperty As PropertyName()
    ) As MultiStatus

#### Parameters

address
  Type: System
  String
  The URI that identifies the resource.
addProperty
  Type:
  Independentsoft.Webdav
  Property
  Array of properties to set (add).
removeProperty
  Type:
  Independentsoft.Webdav
  PropertyName
  Array of properties to remove.

#### Return Value

Type: MultiStatus
A MultiStatus response as a result of operation.
Examples
The following example demonstrates how to use this method:
Copy

    Property[] addProperty = new Property[2];
    addProperty[0] = new Property("newproperty1","mynamespace:","123456789");
    addProperty[1] = new Property("newproperty2","mynamespace:","abcd");

    PropertyName[] removeProperty = new PropertyName[1];
    removeProperty[0] = new PropertyName("oldproperty1","mynamespace:");

    resource.ChangeProperty("http://server/folder1/",addProperty,removeProperty);

See Also

#### Reference

Resource Class
ChangeProperty Overload
Independentsoft.Webdav Namespace

Copyright 2022 Independentsoft

Send comments on this topic to support@independentsoft.de