What I'm trying to achieve is to merge three strings. Two strings are provided as; First name and last name, while the third is a simple comma / space separator. Looking at the following lines of code:
// working code var sep = ","; Var fullName = myNewBO [0] .lstran + + sep + my nevo [0]. first name; // erronus code var fullname = myNewBO [0] .name + "," + myNewBO [0] .FirstName;
The string is returned to a cell in the datagrid view. The latter does not execute as the first bit of code. Does not appear in the string cell as expected, can anyone tell me why does not it work? Apart from this, if you have a better solution to the problem then please provide one.
Edit: Solve As is suspected, and many responses have been told that the problem was elsewhere in my code, two options do the exact same thing, thanks to the syntax tips :)
I suspect that something else is happening in your code, and you're 'fault where the error is happening. I can not see for my life that they both behave in different ways. I suggest that you log in the value after assignment for both matters - I'm sure you will find that they are the same.
Comments
Post a Comment