I.. Net Framework
1. How to obtain a system folder
Use the GetFolderPath method of the System.envioment class, for example:
Environment.getfolderpath (Environment.SpecialFolder.Personal)
2. How to get the path of an EXE file being executed
1 using the ExecutablePath property of the application class
2) System.Reflection.Assembly.GetExecutingAssembly (). Location
3. How to detect the version of the operating system
Use the OSVersion property of Envioment, for example:
OperatingSystem os = Environment.OSVersion;
MessageBox.Show(os.Version.ToString());
MessageBox.Show(os.Platform.ToString());
4. How to obtain the file name portion of the document based on the full file name,
Methods for using the System.IO.Path class GetFileName or Getfilenamewithoutextension methods
5. How to obtain the file extension through the full name of the file
Using the System.IO.Path.GetExtension static method
6. What is the difference between VB and C # 's syntax click here
7. How to get the current computer user name, whether networking, several monitors, the domain, the mouse has several keys and other information
Use static properties of the System.Windows.Forms. SystemInformation class
8. What is the effect of the [STAThread] attribute of the modifier main method
To indicate that the current program is running in a single threaded way
9. How to read the contents of a CSV file
Through OdbcConnection you can create a link to a CSV file that is formatted as "Driver={microsoft Text Driver (*.txt;*.csv)};D bq=" +cvs file Folder path + " Extensions=asc,csv,tab,txt; Persist security Info=false ";
After you create the connection, you can use DataAdapter to access the CSV file.