Link to home
Start Free TrialLog in
Avatar of grogo21
grogo21

asked on

C# Syntax Error

Hello,

what am i doing wrong?

ReturnStatus.Value = "Error Retrieving Image - " & e.Message.ToString & "  -  " & imgUrl.ToString;

I get error:
Operator '&' cannot be applied to operands of type 'string' and 'method group'      

ReturnStatus.Value is a string.

Thanks!


Avatar of Pratima
Pratima
Flag of India image

use +

ReturnStatus.Value = "Error Retrieving Image - " + e.Message.ToString + "  -  " + imgUrl.ToString;
ASKER CERTIFIED SOLUTION
Avatar of dipakdave1983
dipakdave1983

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dipakdave1983
dipakdave1983


ReturnStatus.Value = "Error Retrieving Image - " +  e.Message.ToString() +  "  -  " + imgUrl.ToString();

1) missing () for toString function
2) use + for concatanation
3) ; semicollon in the last( although you had already in your syntex);
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial