C#-> Notifyicon.Text

  • Thread starter Thread starter Hareth
  • Start date Start date
H

Hareth

I tried to do this:

string count = "0";


count = count + 1;
notifyIcon1.Text = "Testing " & count & " numbers"; <- generated error


It doesnt accept "&" or "||"

Any suggestions?

I got the idea fom vb so Im not exactly sure.
 
Hareth said:
I tried to do this:

string count = "0";


count = count + 1;
notifyIcon1.Text = "Testing " & count & " numbers"; <- generated error
this should be
notifyIcon1.Text = "Testing " + count + " numbers";

& is a VB operator, the + operator is the C# equivilent.
 
Thanx.....

It worked


Daniel O'Connell said:
this should be
notifyIcon1.Text = "Testing " + count + " numbers";

& is a VB operator, the + operator is the C# equivilent.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top