به نام خدا سلام بر برنامه نویسان عزیز 😉 در این مطلب از وب سایت پروگرم 98 آموزش حذف عناصر از linked list در #C را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
خروجی این کد به صورت زیر می باشد:
Adding 5 elements.
Removing 2 elements.
Number of elements: 3
Removing 2 elements.
Number of elements: 3
کد حذف عناصر از linked list در #C :
using System;
using System.Collections.Generic;
class MainClass {
public static void Main() {
// Create an linked list.
LinkedList<char> ll = new LinkedList<char>();
Console.WriteLine("Adding 5 elements.");
// Add elements to the linked list
ll.AddFirst('A');
ll.AddFirst('B');
using System.Collections.Generic;
class MainClass {
public static void Main() {
// Create an linked list.
LinkedList<char> ll = new LinkedList<char>();
Console.WriteLine("Adding 5 elements.");
// Add elements to the linked list
ll.AddFirst('A');
ll.AddFirst('B');