<October 2022>

On this page...



Member of...

ASP Insiders

MVP Visual Developer ASP/ASP.NET

Enter CodeZone

Blog Categories



Deutsche Resourcen


Sign In

#  Wednesday, November 16, 2005

Lunch breaks always tend to end up being cut short by stupid ideas, today by my insistence to use My (from Visual Basic) in C#. To get up to speed on My, I suggest looking at Development with My in the MSDN library. The class diagram graphic will come in handy later on.

Step 1 is to reference the Microsoft.VisualBasic.dll assembly:

Next, we need a couple of includes:

using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic.FileIO;
using Microsoft.VisualBasic.Logging;

Why those and not Microsoft.VisualBasic.MyServices? Well, My is just an amalgamation of various classes that live in those namespaces: Computer, Audio, ... All the stuff you saw in the class diagram in the article Development with My.

Basically, you now have the functionality provided by My, but not as nicely grouped with a My object as in Visual Basic. To achieve this, have a look at the article C# My Services by Gildeoni Santos, it sports a download for wrapping My. As the code (at the time of this writing) is based on Beta 1 bits, you will have to put in the correct namespace references and pull the My prefix on all class names.

Categories: .NET | C#
Wednesday, November 16, 2005 1:10:40 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]


© Copyright 2022 Christoph Wille

newtelligence dasBlog 2.3.9074.18820
Subscribe to this weblog's RSS feed with SharpReader, Radio Userland, NewsGator or any other aggregator listening on port 5335 by clicking this button.   RSS 2.0|Atom 1.0  Send mail to the author(s)

Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.