In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "how to use the VB.NET Environment class", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the VB.NET Environment class" this article.
In previous versions of VB, we needed to use complicated API functions to get special folder locations such as "my documents" and "my computer", while VB.NET provided us with the Environment.GetFolderPath method, which allows us to use one line of code to achieve effects that previously required complex code to complete.
The VB.NET Environment class is the information that .NET provides about the current environment and platform and the methods to manipulate them. You can use the VB.NET Environment class to retrieve information, such as command-line parameters, exit code, environment variable settings, the contents of the call stack, the time since the last system boot, and the version of the common language runtime.
A GetFolderPath method is provided in the VB.NET Environment class that allows us to get the path to the system-specific folder identified by the specified enumeration. Returns the path to a special folder for the specified system if it actually exists on the computer; otherwise, an empty string (").
Here are a few commonly used special folder acquisition code: 'get the logical desktop, note that it is not the physical file system location.
Environment.GetFolderPath (Environment.SpecialFolder.Desktop) 'gets the directory used to physically store file objects on the desktop. Environment.GetFolderPath (Environment.SpecialFolder.DesktopDirectory) 'get the my computer folder. Environment.GetFolderPath (Environment.SpecialFolder.MyComputer 'get the my documents folder. Environment.GetFolderPath (Environment.SpecialFolder.Personal) http://www.qqread.com/book/myvbnet/my0055.html 'gets the location of the IE's History folder. Environment.GetFolderPath (Environment.SpecialFolder.History)
There are other enumerated values for special folders that are not commonly used, which we will not explain.
The above is all the content of this article "how to use VB.NET Environment Class". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.