🔒 Closed C# about stuck (help po)

Status
Not open for further replies.

Maginaku

Honorary Poster
Baka matulungan nyopo ako jan mga sir. Please po. Sana Respect nalang po sa post ko. Salamat po. Hirap lang po talaga. Sa pagiging first year pero kakayanin. Sana po may tumulong sakin. Salamat po.
 

Attachments

  • Screenshot_20210107_173046.webp
    Screenshot_20210107_173046.webp
    16 KB · Views: 26
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);
}
 
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);
}
Sige po. Wait lang po ah. Salamat po.
 
Sige po. Wait lang po ah. Salamat po.
Bakit po kaya ganto sir? Pa check po hehe. Sensya napo baguhan lang t*ng* papo ako. Dito hehe. Sorry po.
 

Attachments

  • Screenshot_20210107_193033_com.radinc.csharpshell.webp
    Screenshot_20210107_193033_com.radinc.csharpshell.webp
    32.7 KB · Views: 20
  • Screenshot_20210107_193030_com.radinc.csharpshell.webp
    Screenshot_20210107_193030_com.radinc.csharpshell.webp
    15.5 KB · Views: 15
comment mo muna yung isang console.writeline
saka comment mo din muna yung remove kung gusto mo test per each
 
//Add an element
queue.Enqueue("first");
queue.Enqueue("second asdasdasdsa");
queue.Enqueue("third");
Console.WriteLine();
//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);

Saan pojan? Sensya napo nalilito po ako.
 
Status
Not open for further replies.

About this Thread

  • 10
    Replies
  • 362
    Views
  • 2
    Participants
Last reply from:
Maginaku

Online now

Members online
976
Guests online
1,343
Total visitors
2,319

Forum statistics

Threads
2,277,053
Posts
28,973,948
Members
1,229,697
Latest member
librengsabit01
Back
Top