GameBuilder GameBuilder - 1 year ago 75 Question

How do I use a variable instead of a literal string?

I have a function:

Private Function generateXMLSchema(ZRouteName) As String

Dim generatedXmlSchema As String ="<Name>tEST 250504</Name>"

Where the value of the "Name" element is a literal string.

I want to use the variable
instead of the literal string:


I am getting the error: "Syntax Error".

Please help to rectify this.

Answer Source

You need to use the ampersand (&) to concatenate your variable to the string like this

"<Name>" & ZRouteName & "</Name>"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download