Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Edited Unassigned: Issue concatenating java string and c sharp string [55]

0
0
This is in the basic java engine (not v8)

I have some basic code here (in javascript):
```
var accountstr = host.newVar(CLRString);
if (!downloadInfo.TryGetValue("Account", accountstr.out))
{
accountstr = "No Key found";
}
var output = "_" + accountstr;

return output;
```

This should be returning "_908561", but is instead giving me "_undefined". When I remove the underscore concatenation, I get the proper result.

Is there some sort of trick when concatenating a c sharp string and a javascript string?


EDIT:
I managed to find a solution to my problem. For some reason, I have to call .ToString on my System.String. Very weird I had to do this, but it worked.

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images