• 大小: 15.83MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-31
  • 语言: C#
  • 标签: C#  

资源简介

C#课程要求所做的通讯录,使用简单代码实现的小型通讯录。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;


namespace AddressList
{
    class createtext
    {
        //创建txt文件以及照片文件夹
        //判断照片及通讯录文件夹是否存在,不存在则生成
        public static void createDirectory()
        {
            if (!Directory.Exists(@“D:\AddressList“))
            {
                string photopath = @“D:\AddressList\photo“;
                string txtpath = @“D:\AddressList\txt“;
                Directory.CreateDirectory(photopath);
                Directory.CreateDirectory(txtpath);
            }
        }
        //判断txt文件是否存在,不存在则在D盘下面生成一个txt
        public static void createText()
        {
            if (!File.Exists(@“D:\AddressList\txt\test.txt“))
            {
                FileStream fs = new FileStream(@“D:\AddressList\txt\test.txt“ FileMode.Create FileAccess.Write);//创建写入文件 
                fs.Close();
            }


        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-03-18 01:08  201111172041-王彦文-作业2\
     目录           0  2014-03-18 01:07  201111172041-王彦文-作业2\AddressList\
     目录           0  2014-03-18 01:07  201111172041-王彦文-作业2\AddressList\AddressList\
     文件         923  2014-03-16 09:51  201111172041-王彦文-作业2\AddressList\AddressList.sln
     文件       49152  2014-10-20 14:25  201111172041-王彦文-作业2\AddressList\AddressList.v11.suo
     文件        4375  2014-03-16 10:01  201111172041-王彦文-作业2\AddressList\AddressList\AddressList.csproj
     目录           0  2014-03-18 01:07  201111172041-王彦文-作业2\AddressList\AddressList\bin\
     目录           0  2014-03-20 10:37  201111172041-王彦文-作业2\AddressList\AddressList\bin\Debug\
     文件       35840  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\bin\Debug\AddressList.exe
     文件       79360  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\bin\Debug\AddressList.pdb
     文件       21464  2014-10-21 21:26  201111172041-王彦文-作业2\AddressList\AddressList\bin\Debug\AddressList.vshost.exe
     文件         490  2013-06-18 20:28  201111172041-王彦文-作业2\AddressList\AddressList\bin\Debug\AddressList.vshost.exe.manifest
     文件        1120  2014-03-18 01:05  201111172041-王彦文-作业2\AddressList\AddressList\createtext.cs
     文件       18507  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\Form1.cs
     文件       15963  2014-03-18 01:06  201111172041-王彦文-作业2\AddressList\AddressList\Form1.Designer.cs
     文件        5817  2014-03-18 01:06  201111172041-王彦文-作业2\AddressList\AddressList\Form1.resx
     文件        3380  2014-03-18 01:05  201111172041-王彦文-作业2\AddressList\AddressList\Form2.cs
     文件       11654  2014-03-18 00:36  201111172041-王彦文-作业2\AddressList\AddressList\Form2.Designer.cs
     文件        5817  2014-03-18 00:36  201111172041-王彦文-作业2\AddressList\AddressList\Form2.resx
     文件        7543  2014-03-18 01:05  201111172041-王彦文-作业2\AddressList\AddressList\Form3.cs
     文件       17390  2014-03-18 00:36  201111172041-王彦文-作业2\AddressList\AddressList\Form3.Designer.cs
     文件        5817  2014-03-18 00:36  201111172041-王彦文-作业2\AddressList\AddressList\Form3.resx
     目录           0  2014-03-18 01:07  201111172041-王彦文-作业2\AddressList\AddressList\obj\
     目录           0  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\
     文件        2234  2014-10-21 21:26  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.csproj.FileListAbsolute.txt
     文件         963  2014-03-18 01:06  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.csproj.GenerateResource.Cache
     文件        1757  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.csprojResolveAssemblyReference.cache
     文件       35840  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.exe
     文件         180  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.Form1.resources
     文件         180  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.Form2.resources
     文件         180  2014-10-21 21:24  201111172041-王彦文-作业2\AddressList\AddressList\obj\Debug\AddressList.Form3.resources
............此处省略28个文件信息

评论

共有 条评论