{"id":24455664,"url":"https://github.com/skyl1te/mylist","last_synced_at":"2025-03-14T07:40:54.303Z","repository":{"id":244652383,"uuid":"815843507","full_name":"Skyl1te/MyList","owner":"Skyl1te","description":"This project implements a custom generic list class ReList\u003cT\u003e, which is a simplified version of the standard list in C#.","archived":false,"fork":false,"pushed_at":"2024-06-16T10:44:41.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T02:14:02.045Z","etag":null,"topics":["csharp","net-7-0"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Skyl1te.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-16T10:40:44.000Z","updated_at":"2024-06-28T13:39:38.000Z","dependencies_parsed_at":"2024-06-16T12:48:51.188Z","dependency_job_id":"3a7556ac-3792-4fcf-a611-4ff0e0330d62","html_url":"https://github.com/Skyl1te/MyList","commit_stats":null,"previous_names":["skyl1te/mylist"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyl1te%2FMyList","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyl1te%2FMyList/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyl1te%2FMyList/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skyl1te%2FMyList/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skyl1te","download_url":"https://codeload.github.com/Skyl1te/MyList/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243544668,"owners_count":20308168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","net-7-0"],"created_at":"2025-01-21T02:14:04.531Z","updated_at":"2025-03-14T07:40:54.265Z","avatar_url":"https://github.com/Skyl1te.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ReList.cs\n\n### Description\n`ReList.cs` defines a generic list implementation `ReList\u003cT\u003e` that mimics some functionalities of `List\u003cT\u003e` in C#. It includes basic operations like adding, removing, indexing, cloning, and equality comparison.\n\n### Features\n- **Generic Type**: Supports storing elements of any type `T`.\n- **Basic Operations**: Includes `Add`, `Remove`, `Clear`, `Contains`, `CopyTo`, `IndexOf`, `Insert`, and `RemoveAt`.\n- **Equality**: Implements `IEquatable` for comparing lists.\n- **Cloning**: Implements `ICloneable` to create a deep copy of the list.\n- **Iteration**: Implements `IEnumerable\u003cT\u003e` for iteration using `foreach`.\n\n### Methods\n\n- **`Add(T item)`**: Adds an item to the end of the list.\n- **`Clear()`**: Clears all items from the list.\n- **`Contains(T item)`**: Checks if the list contains a specific item.\n- **`CopyTo(T[] array, int arrayIndex)`**: Copies the elements of the list to an array starting at a specific index.\n- **`IndexOf(T item)`**: Returns the index of the first occurrence of a specific item.\n- **`Insert(int index, T item)`**: Inserts an item at the specified index.\n- **`Remove(T item)`**: Removes the first occurrence of a specific item from the list.\n- **`RemoveAt(int index)`**: Removes the item at the specified index.\n- **`Equals(ReList\u003cT\u003e other)`**: Compares two lists for equality based on their elements.\n- **`Clone()`**: Creates a deep copy of the list.\n- **`GetEnumerator()`**: Returns an enumerator that iterates through the list.\n\n### Additional Method\n- **`PrintReList()`**: Prints all elements of the list to the console.\n\n## Program.cs\n\n### Description\n`Program.cs` demonstrates the usage of `ReList\u003cT\u003e` with integer elements. It showcases basic operations, cloning, equality comparison, and iteration using `foreach`.\n\n### Example\n```csharp\nReList\u003cint\u003e list1 = new ReList\u003cint\u003e();\nlist1.Add(1);\nlist1.Add(2);\nlist1.Add(3);\n\nConsole.WriteLine(\"List1:\");\nlist1.PrintReList();\n\nReList\u003cint\u003e list2 = new ReList\u003cint\u003e();\nlist2.Add(1);\nlist2.Add(2);\nlist2.Add(3);\n\nConsole.WriteLine(\"List2:\");\nlist2.PrintReList();\n\nbool areEqual = list1.Equals(list2);\nConsole.WriteLine($\"Are List1 and List2 equal? {areEqual}\");\n\nReList\u003cint\u003e list3 = (ReList\u003cint\u003e)list1.Clone();\n\nConsole.WriteLine(\"List3 (cloned from List1):\");\nlist3.PrintReList();\n\nlist3.Add(4);\nConsole.WriteLine(\"List3 after adding an element:\");\nlist3.PrintReList();\n\nareEqual = list1.Equals(list3);\nConsole.WriteLine($\"Are List1 and List3 still equal? {areEqual}\");\n\nConsole.WriteLine(\"---------\");\nforeach (var item in list3)\n{\n    Console.WriteLine(item);\n}\n```\n\n### Output\n```\nList1:\n1 2 3 \nList2:\n1 2 3 \nAre List1 and List2 equal? True\nList3 (cloned from List1):\n1 2 3 \nList3 after adding an element:\n1 2 3 4 \nAre List1 and List3 still equal? False\n---------\n1\n2\n3\n4\n```\n\n## Conclusion\nThis project provides a custom generic list implementation (`ReList\u003cT\u003e`) with fundamental list operations and demonstrates its usage through a sample program. It can be utilized as a learning resource or integrated into projects requiring custom list functionalities.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyl1te%2Fmylist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyl1te%2Fmylist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyl1te%2Fmylist/lists"}