How to access `My` in .NET Core?

  • Thread starter Thread starter Jura4936
  • Start date Start date
J

Jura4936

Guest
Hello!

I'm practising with Visual Basic .NET and going through a book. I made a .NET Core 3.1 app following the tutorial here: Create a Hello World application with .NET Core in Visual Studio - .NET Core

In my book the author uses the `My` namespace to access objects. How do I do that in .NET Core?

This is the problem:

My.Computer.FileSystem.GetDirectories("C:\")

I get this error:

Severity Code Description Line Suppression State
Error BC30456 'Computer' is not a member of 'Practice_vb_core.My'. 11 Active


I of course looked on the internet, but "my" is such a common word that the search results are very unhelpful. Hopefully someone here knows the answer. :-)

Thanks!

Continue reading...
 

Similar threads

E
Replies
0
Views
241
EN59CVH
E
E
Replies
0
Views
300
EN59CVH
E
G
Replies
0
Views
101
Goti Kalpesh
G
Back
Top