Blog Stats
  • Posts - 19
  • Articles - 3
  • Comments - 0
  • Trackbacks - 18

 

Oh MY!

I was going through VS2005, as all the .NET geeks would do, after work (or during the work!)...

The feature which made me happy is the My namespace. The only glitch is that C# does not support this namespace, and we may end up wrapping this up if we are implementing a cross-language solution. The My namespace does reduce lot of coding time, reducing lot of not-so-fun activities. For example, how would we find out a network connection is available? I mean how would we see that a server is available or not. Ping it, dude! OK, but how do I do that with ASP.NET? Ping it, dude!

Yes, we may have to use command shell and execute the ping command.

Not any more, friends! There is the My namespace to our rescue. My.Computer.Network.Ping(“http://www.cnn.com“). No kidding!

This is just a corner of My namespace. There is a plethora of features which we can exploit using the My namespace.

Oh My!

 

 


Feedback

# re: Oh MY!

Gravatar BTW, to use the My namespace with C# all you have to do is:

- add a reference to Microsoft.VisualBasic
- include 'using Microsoft.VisualBasic.MyServices

So CSharp has the mojo too!

Here's a link for more information:

www.programmersheaven.com/2/C-Sharp-2-Name-Space

11/16/2005 11:54 AM | Brian

# re: Oh MY!

Gravatar Mmhh...C# asking help from Visual Basic....I like that :-) 11/16/2005 12:24 PM | Rajeev Gopal

Post a comment





 

 

 

Copyright © Rajeev Gopalakrishnan