Page Rank

Subscribe

Categories

Recent posts

Alexa Rank

Using QUEUE in VB


  • This topic explains about, how to use QUEUE in VB programming.
  • Tools needed: Button1 (Button1), Button2 (Button2), RichTextBox1 (RichTextBox1).

QUEUEUsing QUEUE in VB

  • Queue is a particular kind of Abstract data type or collection. Queue works like First-In-First-Out Method, which means the item added first in the Queue is the item get out from the Queue. Addition of the item at the rear terminal position is known as enqueue, removal of the item from the fornt terminal position is known as dequeue.

Commonly using function:

Enqueue : Add an Item in Queue

Syntax : Stack.Enqueue(Object)

Object : The item to add in Queue

Dequeue : Remove the oldest item from Queue

Syntax : Stack.Dequeue()

Returns : Remove the oldest item and return.

Peek : Get the reference of the oldest item

Syntax : Stack.Peek()

returns : Get the reference of the oldest item in the Queue

Queue ClassUsing QUEUE in VB

  • Queue class represents a first-in, first-out collection of objects.

Namespace:  System.Collections

Assembly:  mscorlib (in mscorlib.dll)

  • Syntax


Queue.Enqueue Method Using QUEUE in VB

  • Help to add an object to the end of the queue.

Namespace:  System.Collections

Assembly:  mscorlib (in mscorlib.dll)

  • Syntax

Queue.Dequeue Method Using QUEUE in VB

  • Queue.Dequeue Method helps to remove the item at the beginning of the queue.

Namespace:  System.Collections

Assembly:  mscorlib (in mscorlib.dll)

  • Syntax

Queue.Contains MethodUsing QUEUE in VB

  • Helps to determine whether the item is present in the queue.

Namespace:  System.Collections

Assembly:  mscorlib (in mscorlib.dll)

  • Syntax

Using QUEUE in VBComplete Code

Using QUEUE in VB


VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">