Archived
1
0

统一归档20260319

This commit is contained in:
2026-03-19 19:39:01 +08:00
Unverified
parent 4e148364a9
commit 3ea0af246b
187 changed files with 5041 additions and 75005 deletions

11
CS/lab11/15_2/15_2.csproj Normal file
View File

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>_15_2</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

25
CS/lab11/15_2/15_2.sln Normal file
View File

@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36717.8 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "15_2", "15_2.csproj", "{D437CE40-AC0B-464E-86CB-5D994033F3DC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D437CE40-AC0B-464E-86CB-5D994033F3DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D437CE40-AC0B-464E-86CB-5D994033F3DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D437CE40-AC0B-464E-86CB-5D994033F3DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D437CE40-AC0B-464E-86CB-5D994033F3DC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4A5F0527-7568-4AEE-BC4C-E898DFB182FE}
EndGlobalSection
EndGlobal

37
CS/lab11/15_2/Program.cs Normal file
View File

@@ -0,0 +1,37 @@
namespace _15_2
{
internal class Program
{
static void Main(string[] args)
{
string path0 = @"c:\Windows\security";
string path1 = @"c:\Windows";
try
{
Console.WriteLine("当前工作目录:\n{0}", Directory.GetCurrentDirectory());
string[] subDirectory = Directory.GetDirectories(Directory.GetDirectoryRoot(Directory.GetCurrentDirectory()));
Console.WriteLine("根目录里的子目录数{0},其名称分别为:\n", subDirectory.Length);
foreach (string items in subDirectory)
{
Console.WriteLine(items);
}
string[] dirs = Directory.GetFiles(path0);
Console.WriteLine("{0}目录下文件总数{1},分别是", path0, dirs.Length);
foreach (string items in dirs)
{
Console.WriteLine(items);
}
string[] dir1 = Directory.GetFiles(path1, "*.ini");
Console.WriteLine("{0}目录下文件后缀为ini的文件总数{1},分别是", path0, dir1.Length);
foreach (string items in dir1)
{
Console.WriteLine(items);
}
}
catch (Exception e)
{
Console.WriteLine("\n 操作失败:{0}",e.ToString());
}
}
}
}