[".vb~.C$ ","H'Aer3~hCE|F96}(CP766666}()CP6696}X","Queue."," A Queue is a generic collection in VB.NET. It implements a FIFO algorithm. With Queue, you can keep a sliding cache of elements, with the one added first always being the first to be removed. ","First-In-First-Out: ","The element that is added first (with Enqueue) is also the first one that is removed (with Dequeue).","Enqueue."," This program demonstrates two important concepts of the Queue type. First, it shows the Enqueue method, which you use to add an element to the Queue. Next, it loops over the elements in the Queue with the For-Each looping construct. ","For Each is implemented in a special way so that it shows all the internal elements in the Queue.","For Each ","for-each-vbnet"," .NET 4\n\n","VB.NET program that uses Queue generic type","\n\nModule Module1\n Sub Main()","\n ' Add integers to Queue.\n ","Dim q As ","Queue","(Of Integer) = New Queue(Of Integer)()\n q.Enqueue(5)\n q.Enqueue(10)\n q.Enqueue(15)\n q.Enqueue(20)","\n\n ' Loop over the Queue.\n ","For Each element As Integer In q\n Console.WriteLine(element)\n Next\n End Sub\nEnd Module\n\n","\n\n5\n10\n15\n20","Enum Queue."," In this example, we explore how the Queue can be used to store help requests in a system. As users request help for a program, the requests can be added to the Queue with Enqueue. ","Then: ","Those requests (represented by RequestType) can be read with Dequeue after testing them with Peek.","VB.NET program that uses Enum Queue","\n\nModule Module1\n Enum RequestType As Integer\n MouseProblem\n TextProblem\n ScreenProblem\n ModemProblem\n End Enum\n\n Sub Main()\n Dim help As ","Queue","(Of RequestType) = New Queue(Of RequestType)()","\n\n ' Add some problems to the queue.\n ","help.Enqueue(RequestType.TextProblem)\n help.Enqueue(RequestType.ScreenProblem)","\n\n ' If first problem is not a mouse problem, handle it.\n ","If help.Count > 0 Then\n If Not help.Peek = RequestType.MouseProblem Then","\n ' This removes TextProblem.\n ","help.Dequeue()\n End If\n End If","\n\n ' Add another problem.\n ","help.Enqueue(RequestType.ModemProblem)","\n\n ' See all problems.\n ","For Each element As RequestType In help\n Console.WriteLine(element.ToString())\n Next\n End Sub\nEnd Module\n\n","\n\nScreenProblem\nModemProblem","With a Queue,"," the oldest (first added) help requests will be the first to be handled. With a Stack, the newest help requests would be the first to be handled. You would always provide help to people who most recently requested it.","CopyTo."," How can you copy a Queue to an array? Some other functions in your program may demand an array argument or you may want to simply store the elements in an array field. To copy to an array, first allocate an array with the array syntax. ","Next: ","Call CopyTo and pass the reference variable to that array as the first argument.","VB.NET program that uses CopyTo","\n\nModule Module1\n Sub Main()","\n ' New queue.\n ","Dim q As Queue(Of Integer) = New Queue(Of Integer)()\n q.Enqueue(5)\n q.Enqueue(10)\n q.Enqueue(20)","\n\n ' Create new array of required length.\n ","Dim arr(q.Count - 1) As Integer","\n\n ' CopyTo.\n ","q.","CopyTo","(arr, 0)","\n\n ' Display elements.\n ","For Each element In arr\n Console.WriteLine(element)\n Next\n End Sub\nEnd Module\n\n","\n\n5\n10\n20","Summary."," In these examples, we explored some characteristics of the Queue collection in the VB.NET language. With Queue, we gain a FIFO collection implementation. This can be used to implement higher-level concepts such as a help request system."]

%iVBORw0KG;)NSUhEUg?AMg?ABnC)ABgeVJ5?AD6ElEQVR4Xu3aoa7jOBiG4bnHvYSFvYDSBUdaVOnwkqKg0CMDQ4OowCDEIMBgTIwMAgJMvlXBuPl04qaa0/XEM3lhfvQosmyn/YZPhWBvhRCRyS+FWwjZSXTP5fFTMQTj0Il7qrcTFroshVuQ2Yn797nar0OiVeJT2lcHsVIsp@VkLET2UysB+KleFA31gJx4nFyrAPixFoq1gAZpVhNVwCJSjyRow3REOKatj1rzHU+MWkyaq0lAVqdOr8EMghODiG4XnBCRszyBDHZkcc8RxCNVPsKyCS4bsKtIAVntw4xmWU9skTIjUOi4MY0s4Lz24ZYdhjc0zzqtw3pGDLhnueR/P8g/uvH+Cm/XQCSh+OrIS/sm2eIpanhodsyxGaW+tLRZXgtpNWzxq9CNENAjTzUL4Vw7qsQXusaXEUQ8RCiaCrrgRhwmsf1QGzdEH4jYdBCCG18zRCNUSeVcjVBFEMcuypa7JogUnBP7iNqAxtiL6ifg0jMshs4oqxkkYoEaTGLrvOhG.sAJRf/vDosl9SMEvRoBgkf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