diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..1ff0c423042b46cb1d617b81efb715defbe8054d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git "a/\346\236\227\350\267\203\345\275\254/ConsoleApp1.sln" "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1.sln" new file mode 100644 index 0000000000000000000000000000000000000000..d4c78f3b83e0201dab5c9e770da15efa65970de1 --- /dev/null +++ "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1.sln" @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1082 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{DAEEAC5F-1685-441C-8757-E387DE356C3F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DAEEAC5F-1685-441C-8757-E387DE356C3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DAEEAC5F-1685-441C-8757-E387DE356C3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DAEEAC5F-1685-441C-8757-E387DE356C3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DAEEAC5F-1685-441C-8757-E387DE356C3F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {77EF1B5C-92B8-4D29-96B5-3EBB4BA7D648} + EndGlobalSection +EndGlobal diff --git "a/\346\236\227\350\267\203\345\275\254/ConsoleApp1/App.config" "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/App.config" new file mode 100644 index 0000000000000000000000000000000000000000..731f6de6c291e303814b02808f34140fe560e8e4 --- /dev/null +++ "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/App.config" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\346\236\227\350\267\203\345\275\254/ConsoleApp1/ConsoleApp1.csproj" "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/ConsoleApp1.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..895dcd007b6129789f8e802f54939d6a5babb0c8 --- /dev/null +++ "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/ConsoleApp1.csproj" @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {DAEEAC5F-1685-441C-8757-E387DE356C3F} + Exe + ConsoleApp1 + ConsoleApp1 + 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/\346\236\227\350\267\203\345\275\254/ConsoleApp1/Program.cs" "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/Program.cs" new file mode 100644 index 0000000000000000000000000000000000000000..3807eaeee48a1b7925a65557c3f9e2940af23a5d --- /dev/null +++ "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/Program.cs" @@ -0,0 +1,47 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConsoleApp1 +{ + class Program + { + static void Main(string[] args) + { + SortedList bus = new SortedList(); + bus.Add(1, "哈哈哈"); + bus.Add(2, "急急急"); + bus.Add(3, "酷酷酷"); + bus.Add(4, "啦啦啦"); + + Console.WriteLine("请输入你的号数:"); + int id = int.Parse(Console.ReadLine()); + bool resd = bus.ContainsKey(id); //判断是否包含特定值 + + if (resd) + { + Console.WriteLine("名字是:{0}", bus[id].ToString()); + } + else + { + Console.WriteLine("输入错误哦~"); + } + + Console.WriteLine(""); + foreach (DictionaryEntry d in bus) //遍历 + { + int key = (int)d.Key; + string value = d.Value.ToString(); + Console.WriteLine("号数为{0}名字为{1}", key, value); + } + + + } + } + + + +} diff --git "a/\346\236\227\350\267\203\345\275\254/ConsoleApp1/Properties/AssemblyInfo.cs" "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000000000000000000000000000000000000..8f358deb86b22da02a80eeb523ec789bf9256f6a --- /dev/null +++ "b/\346\236\227\350\267\203\345\275\254/ConsoleApp1/Properties/AssemblyInfo.cs" @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("ConsoleApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleApp1")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("daeeac5f-1685-441c-8757-e387de356c3f")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")]