MarkLogic XCC/.Net Library |

# Request.SetNewVariable Method

Convenience method that creates a new XdmVariable, binds it to this Request and then returns the new XdmVariable object. This method is equivalent to:

                XdmVariable temp = ValueFactory.newVariable (xname, value);
                request.setVariable (temp);
                return temp;

#### Overload List

Convenience method that creates a new XdmVariable, binds it to this Request and then returns the new XdmVariable object. This method is equivalent to:

                XdmVariable temp = ValueFactory.newVariable (xname, value);
                request.setVariable (temp);
                return temp;

> XdmVariable SetNewVariable(XName,XdmValue);

Convenience method that creates a new XdmVariable, binds it to this Request and then returns the new XdmVariable. This method is equivalent to:

                XdmVariable temp = ValueFactory.newVariable (
                ValueFactory.newXName (null, localname),
                ValueFactory.newValue (type, value));
                request.setVariable (temp);
                return temp;

> XdmVariable SetNewVariable(string,ValueType,object);

Convenience method that creates a new XdmVariable, binds it to this Request and then returns the new XdmVariable object. This method is equivalent to:

                XdmVariable temp = ValueFactory.newVariable (
                ValueFactory.newXName (namespace, localname),
                ValueFactory.newValue (type, value));
                request.setVariable (temp);
                return temp;

> XdmVariable SetNewVariable(string,string,ValueType,object);

#### See Also

Request Interface | Marklogic.Xcc Namespace