Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

Label concatenation

I'm trying to concatenate two strings to a label...

Label1.Text = Label1.Text + ex.ToString;

I get the error that:
Operator + cannot be applied to operands of type 'string' and 'method group.'

what am I doing wrong?

thanks.
ASKER CERTIFIED SOLUTION
Avatar of Yiogi
Yiogi

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
What language?  If VB.neT try & instead of +
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 Craig Wagner
ex.Message is already a string, no need to to a ToString() on it, you're just creating unnecessary overhead.