We do use it in some code, but hesitantly so. It's true that My
often helps make code more readable. For example, the Environment.SpecialFolder
enumeration curiously lacks a Temp
member, whereas My.Computer.FileSystem.SpecialDirectories
has one (Path.GetTempPath()
will do as well, but is hardly intuitive compared to other special folders).
But My
is only beneficial in such cases because the existing APIs are badly-designed, not because My
is inherently better. Like JAGregory, I strongly suggest one avoids extending My
— or any other kind of global namespace, variable, etc. — whenever possible. The idea just doesn't fit a clean OOP architecture.