How to use obstacle avoidance sensor in c#

Hi newbie here

I just want to ask how can my c# application know that my obstacle sensor has detected something.

Like for example my c# application would show up a message box that it was able to detect something.

How can I do that I already search to youtube but I cant seems to find the answer, thanks in advance

Too little information to be able to help you. How is this an Arduino question ( this is not a C# forum)? What obstacle sensor?

Read the how to use this forum sticky to see how to post code and some advice on what we need to know in order to offer intelligent assistance. See #7 & 11 especially.

Arduino is programmed using C++ not C#

I'm going to take a wag here that OP means how does their pc application get to know about what the Arduino has seen.

If so, well just use Serial to send some message from Arduino to pc; how you get your c# to ingest that, no idea.