I'm developing a little C# application for the fun. I love this language but something disturb me ...

Is there any way to do a #define (C mode) or a symbol (ruby mode).

The ruby symbol is quite useful. It's just some name preceded by a ":" (example ":guy") every symbol is unique and can be use any where in the code.

In my case I'd like to send a flag (connect or disconnect) to a function.

What is the most elegant C# way to do that ?

Here is what i'd like to do :

BgWorker.RunWorkersAsync(:connect)
//...

private void BgWorker_DoWork(object sender, DoWorkEventArgs e)
{
  if (e.Arguement == :connect)
    //Do the job
}

At this point the my favorite answer is the enum solution ;)

Edit
Report