Archived
1
0

optimise files

This commit is contained in:
2025-11-25 20:14:10 +08:00
Unverified
parent bb4a37acc4
commit 4e148364a9
171 changed files with 6555 additions and 0 deletions

11
CS/16_3/16_3.csproj Normal file
View File

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

25
CS/16_3/16_3.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.36623.8 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "16_3", "16_3.csproj", "{516064BC-53EE-4754-B189-5AF7DE4BA648}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{516064BC-53EE-4754-B189-5AF7DE4BA648}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{516064BC-53EE-4754-B189-5AF7DE4BA648}.Debug|Any CPU.Build.0 = Debug|Any CPU
{516064BC-53EE-4754-B189-5AF7DE4BA648}.Release|Any CPU.ActiveCfg = Release|Any CPU
{516064BC-53EE-4754-B189-5AF7DE4BA648}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {592FA477-A757-4C0E-83CA-53B7B59DDBEF}
EndGlobalSection
EndGlobal

26
CS/16_3/Program.cs Normal file
View File

@@ -0,0 +1,26 @@
using System;
using System.IO;
namespace _16_3
{
class Program
{
private const string FILE_NAME = @"c:\temp\TestFile.txt";
static void Main(string[] args)
{
using (StreamWriter sw = new StreamWriter(FILE_NAME))
{
sw.Write("文本文件");
sw.Write("的写入/读取");
sw.WriteLine("-----------------------");
sw.WriteLine("写入整数{0},或浮点数{1}", 1, 4.2);
bool b = false; char grade ='A'; string s = "Multiple Data Type!";
sw.WriteLine("写入布尔值、字符、字符串、日期:");
sw.WriteLine(b);
sw.WriteLine(grade);
sw.WriteLine(s);
sw.Write("当前日期:");sw.WriteLine(DateTime.Now);
}
}
}
}