Home > Articles > Programming > Windows Programming

Using the My Feature in Visual Basic .NET

  • Print
  • + Share This
  • 💬 Discuss
Like this article? We recommend

Like this article? We recommend

Computer people are great at coming up with clever quips and phrases. One of Paul Kimmel's favorites is the term "syntactic sugar" meaning something that, like sweets, isn't necessary, but tastes good. That's what the My feature is -- syntactic sugar. The difference between the sugary gooey foods you might eat and the My feature is that My is better for you.

Introduction

Long time no write, kids. Sometimes life throws you a curve, you get whacked, and you take a base. Standing on first a little dazed and confused, it’s good to be writing about something simple and fun: the My feature.

Microsoft Visual Basic developers did something that most of you have been doing for years: They wrapped up some more-complex stuff in a wrapper, mixed in the relatively new meaning of the Shared keyword, and made a bunch of everyday stuff easier to get at. The biggest difference is that you don’t have to do the work in this instance.

Very simply, My is a feature in .NET—used mostly by VB programmers—that condenses namespaces and classes into easier-to-use shared behaviors. My includes a plethora of everyday programming capabilities (including access to the registry, clipboard, writing to the event log, file I/O, and moving files across a network) that I’ll show you how to use.

The code in this article is not intended to show you how clever I am, but rather how easy My is. I do have one gentle word of caution: Like cane sugar, too much "My sugar" can become an excuse to avoid grown-up foods for a little longer. Don’t let tools used to make life a little easier become an opportunity to become complacent about mastering OOP.

  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus