zoukankan      html  css  js  c++  java
  • 【C#】获取当前系统桌面、我的照片、我的文档等路径

    获取当前系统桌面、我的照片、我的文档等路径
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
     
    namespace GetDeskDirectory
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
     
            private void button1_Click(object sender, EventArgs e)
            {
                string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
                MessageBox.Show("桌面的路径是"+dir);
            }
        }
    }
    

     

  • 相关阅读:
    c实现二叉树
    C实现栈与队列
    c的链表实现
    LB_Keogh
    LB_Yi
    LB_Kim
    Lab7:同步互斥
    Lab6:进程的调度
    Lab45:进程和线程
    Lab3:虚拟内存管理
  • 原文地址:https://www.cnblogs.com/hardsoftware/p/5770277.html
Copyright © 2011-2022 走看看