MarkLogic XCC/.Net Library |

# Request.SetNewVariable Method (XName, XdmValue)

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;

[Visual Basic]
Function SetNewVariable( _
ByVal xname As XName, _
ByVal val As XdmValue _
) As XdmVariable
[C#]
XdmVariable SetNewVariable(
XName xname,
XdmValue val
);

#### Parameters

xname
  An instance of XName, which defines a namespace (optional) and a localname.
val
  An instance of XdmValue which will be the value of the XdmVariable.

#### Return Value

The newly construct XdmVariable instance.

#### See Also

Request Interface | Marklogic.Xcc Namespace | Request.SetNewVariable Overload List