Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== C# lists and dictionaries ====== <code c#> // List List<string> list = new(); list.add("alpha"); list.add("beta"); if (list.Contains("alpha")) { } list.ForEach(delegate(String val) { val; }); list.Remove("alpha"); // Dictionary Dictionary<string, UInt16> dict = new(); dict["alpha"] = 1; dict["beta"] = 2; if (dict.ContainsKey("alpha")) { } foreach (KeyValuePair<string, UInt16> entry in [dictionary]) { entry.Key; entry.Value; } dict.Remove("alpha"); </code> development/csharp/lists_and_dictionaries.txt Last modified: 2021/05/27 13:53by 127.0.0.1