diff --git "a/\351\273\204\347\202\216\346\246\225/Text.sln" "b/\351\273\204\347\202\216\346\246\225/Text.sln" new file mode 100644 index 0000000000000000000000000000000000000000..f522e3b27fc5012d7e5b5d5083a5005e3485c65c --- /dev/null +++ "b/\351\273\204\347\202\216\346\246\225/Text.sln" @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.757 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Text", "Text\Text.csproj", "{4FF28BCF-EA4A-490A-BD6A-3246050F5048}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4FF28BCF-EA4A-490A-BD6A-3246050F5048}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4FF28BCF-EA4A-490A-BD6A-3246050F5048}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4FF28BCF-EA4A-490A-BD6A-3246050F5048}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4FF28BCF-EA4A-490A-BD6A-3246050F5048}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4F801DB3-A852-4C22-B1F5-E38C20C03768} + EndGlobalSection +EndGlobal diff --git "a/\351\273\204\347\202\216\346\246\225/Text/App.config" "b/\351\273\204\347\202\216\346\246\225/Text/App.config" new file mode 100644 index 0000000000000000000000000000000000000000..731f6de6c291e303814b02808f34140fe560e8e4 --- /dev/null +++ "b/\351\273\204\347\202\216\346\246\225/Text/App.config" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\351\273\204\347\202\216\346\246\225/Text/Program.cs" "b/\351\273\204\347\202\216\346\246\225/Text/Program.cs" new file mode 100644 index 0000000000000000000000000000000000000000..8ad6901737a3f985bc8c49a8b452f52b33aa0a8b --- /dev/null +++ "b/\351\273\204\347\202\216\346\246\225/Text/Program.cs" @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Text +{ + class Program + { + static void Main(string[] args) + { + //数组 + int[] age = { 17,18,19,20,21}; + Console.WriteLine(age[1]);//18 + + Console.WriteLine("\n"); + + for (int i = 0; i < age.Length; i++) + { + Console.WriteLine(age[i]);//17 18 19 20 21 + } + + Console.WriteLine("\n"); + + int[] num = new int[5];//实例化一个数组 存5个数 因为没有定义 所以5个数都是0 + for (int i = 0; i < num.Length; i++) + { + Console.WriteLine(num[i]);//0 0 0 0 0 + } + + Console.WriteLine("\n"); + + int[,] nums = new int[3, 6]//逗号前面代表行 逗号后面代表列 也就是一共有3行 每行里面有6个数字 + { + { 10,20,30,40,50,60}, + { 11,22,33,44,55,66}, + { 23,43,78,98,46,100} + }; + Console.WriteLine(nums[1,2]);//33 + Console.ReadKey(); + + Work.PrintInfo(); + } + } +} diff --git "a/\351\273\204\347\202\216\346\246\225/Text/Properties/AssemblyInfo.cs" "b/\351\273\204\347\202\216\346\246\225/Text/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000000000000000000000000000000000000..6dad4979364c6b26f2ecfe00c732ab9d9eb65923 --- /dev/null +++ "b/\351\273\204\347\202\216\346\246\225/Text/Properties/AssemblyInfo.cs" @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Text")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Text")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("4ff28bcf-ea4a-490a-bd6a-3246050f5048")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git "a/\351\273\204\347\202\216\346\246\225/Text/Text.csproj" "b/\351\273\204\347\202\216\346\246\225/Text/Text.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..5c6001ff78850d90042ddda3d7e2ab2c47f80cf0 --- /dev/null +++ "b/\351\273\204\347\202\216\346\246\225/Text/Text.csproj" @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {4FF28BCF-EA4A-490A-BD6A-3246050F5048} + Exe + Text + Text + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/\351\273\204\347\202\216\346\246\225/Text/Work.cs" "b/\351\273\204\347\202\216\346\246\225/Text/Work.cs" new file mode 100644 index 0000000000000000000000000000000000000000..db151b62c0af92dff91d137930bff497bec747e0 --- /dev/null +++ "b/\351\273\204\347\202\216\346\246\225/Text/Work.cs" @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Text +{ + public static class Work + { + public static void PrintInfo() + { + string str = "中华人民共和国";//创建一个字符串 + char[] ch = str.ToCharArray();//将字符串拆分为字符 并组成数组 + foreach (var item in ch)//自动识别次数循环出来 + { + Console.WriteLine(item); + } + Console.ReadKey(); + } + } +}