Sunday, October 31, 2004

My. Wrapper for C# et. All

VB.Net 2005 has a new feature called "MY". My provides a quick access path to a lot of useful parts of the .net frame work. C# does not implement this feature however you can import the VB.Net dll and expose these capabilities (most of them) to your c# application.

OurSharp is an My. wrapper in c#. It is a small class that does some basic wrapping of some of the My. Objects. I named it our "Our" because in contrast to VB.net's "MY" this is accessible to all .net languages.

HOW TO USE:
1. Add a reference to Microsoft.VisualBasic.Dll
2. Add "Using Our;" to the top of all source files you want to use this in.
3. To use the My/Our functionality type Our. and select a object from the codecompletion window

The following My classes have been implemented:

Application
Computer
User

The other classes in VB.net MY are dynamically generated as you code - so a VS.Net addin would be required to get that done --- Maybe in the future.

The Source file is posted here

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?