Question
C# I want to run this code without use the System.Collections.Generic library public bool test(x test, x test2) where x : class { return (test
C#
I want to run this code without use the System.Collections.Generic library
public bool test(x test, x test2) where x : class { return (test == test2); } public void Delete(T value) { Node temp = head; // if (temp != null && temp.Value == value) //if (temp != null && EqualityComparer.Default.Equals(temp.Value, value) == true) if (temp != null && test(temp.Value, value) == true) { head = temp.Next; if (head != null) { head.Previous = null; } return; } // while (temp != null && temp.Value != value) // while (temp != null && EqualityComparer.Default.Equals(temp.Value, value) != true) while (temp != null && test(temp.Value, value) != true) { temp = temp.Next; } if (temp == null) { return; } if (temp.Next != null) { temp.Next.Previous = temp.Previous; } if (temp.Previous != null) { temp.Previous.Next = temp.Next; } }
the node for Generic doubly linked list. And I want to delete function to work with both int and string
2 references public bool testStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started