while(!Serial) never becomes true

Hi there,
I have an Arduino Leonardo and want to do some serial stuff with my PC. I added the lines

Serial.begin(9600);
while(!Serial);

in the setup function. This holds the programs execution until I open the serial monitor in the Arduino IDE. Then the program continues.
So far so good.

But when trying the same thing with a terminal application or a C# app I wrote myself it does not work. I can open the COM port fine and even send some data. But the Arduino will never get past "while(!Serial);". I tried that with two computers and several different applications.

Why can the Arduino Serial Monitor "activate" the Arduino and break the while loop?
Why can no other application do it?

I can open the COM port fine and even send some data. But the Arduino will never get past "while(!Serial);". I tried that with two computers and several different applications.

How are you opening the port? You should be able to open the port the same way that the Serial Monitor does.

In the C# app, are you setting DtrEnable to true for the serial instance? The Leonardo needs that.