I decided at HDC 2006 that it was time to make the switch from VB.net to C#. Not because it is better, but because all the presentations I go to are in C#. I hate having to convert languages in my head and since I give presentations every now and then, it's not fair to my audience to make them convert in their head.
I've come to my first road block in migrating to C#. I really like the My. namespace that VB provides and C# doesn't have anything like it. I need to access the My.Computer.Network.IsAvailable and .Ping functions in my current project.
I know that I can add a reference to Microsoft.VisualBasic and access the Devices.Network namespace, but for some reason that makes me feel dirty.
So the question I pose to you C# purists, is there a comparable C# function that will provide network status and ping functionality? If not, should I reference the Microsoft.VisualBasic.dll? If not, do I create a separate VB assembly that exposes the functionality that I need?
Technorati tags:
.NET,
C#,
VB,
My namespace