One of the new features introduced with Visual Basic 2005 is the My namespace.
Provides quick access to some of the most common features which are sometimes hard to find otherwise in the .NET Framework.
All the features in the My object namespace are available in the .NET framework class library.
It means that you might have to learn 2 different ways of accessing the same thing.
My namespace is aimed at making the common development tasks very easy to perform.
Be aware that using these shortcuts might not give you all the power or functionality that you would get by accessing them directly from the class library
Extremely VB centric and not really used by many C# developers.
Also with the My namespace, the code you write will be much easier to understand and maintain when a new developer looks at it for the first time.
Using My Objects
The My objects gives you quick access to application, system and user information without having to search through the .NET Framework libraries
|My.Application||application specific seetings|
|My.Computer||computer component, for example clipboard|
|My.Resources||resources within your solution|
|My.User||current user information|
|My.WebServices||provides an instance of very web service currently references in your solution.|
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext