No I’m not being a wise guy …
For those fortunate enough to not know the My class: It’s something that was added in VB 2005 (and doesn’t exist in C#) and is best described as a ‘speeddial for the .net framework’. Supposed to make life easier for newbies who won’t read which framework classes they should be using
Dim contents As String contents = My.Computer.FileSystem.ReadAllText('c:\mytextfile.txt')
Instead of this:
Dim contents As String contents = IO.File.ReadAllText('c:\mytextfile.txt')
My Question: Where is the MSDN documentation page for which speeddial button maps to what.. ?
By choosing the name of the feature as My – they’ve just made searching a whole lot more fun that it needs to be. I need to code in C# and can’t bear the fun of translating the training/how-to office prog videos which exclusively deal in VB.
More on this from the Dans
- http://msdn.microsoft.com/en-us/magazine/cc163972.aspx
- http://blogs.msdn.com/danielfe/archive/2005/06/14/429092.aspx
Juval Lowy ported My as That in C# as an interim solution. Don’t ask me why…
It’s the ‘My namespace’ rather than the ‘My class’ which may aid searching.
So far I’ve found this: http://msdn.microsoft.com/en-us/vbasic/ms789188.aspx but it’s not ideal. Looking for more…
EDIT: I think ‘Developing with My’ is effectively the root of the documentation.