Queue<string> queue = new Queue<string>();
//Add an element
queue.Enqueue("first");
queue.Enqueue("second asdasdasdsa");
queue.Enqueue("third");
//Remove first element
queue.Dequeue();
//search element
string search = "second";
var result = queue.FirstOrDefault(x => x.Contains(search));
Console.WriteLine(result );
//display queue
foreach(var q in queue){
Console.WriteLine(q);
}
Sige po. Wait lang po ah. Salamat po.try mo
C#:Queue<string> queue = new Queue<string>(); //Add an element queue.Enqueue("first"); queue.Enqueue("second asdasdasdsa"); queue.Enqueue("third"); //Remove first element queue.Dequeue(); //search element string search = "second"; var result = queue.FirstOrDefault(x => x.Contains(search)); Console.WriteLine(result ); //display queue foreach(var q in queue){ Console.WriteLine(q); }
Bakit po kaya ganto sir? Pa check po hehe. Sensya napo baguhan lang t*ng* papo ako. Dito hehe. Sorry po.Sige po. Wait lang po ah. Salamat po.
Sige po. Wait lang po ah. Salamat.
Ganto po sir?comment mo muna yung isang console.writeline
Ganito poba?hindi. Ganito. //Console.Writeline(result)
double slash // use to comment the line para di mag display sa console