Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Text Module Module1 ' Outputs the contents of Packet with Text prefix Function DisplayContents(ByVal Packet As mn.Packet, ByVal Text As String) ' Move cursor to start of packet Packet.SetCursor(0) ' Return string containing contents of packet Dim Contents As String = Packet.GetString(Packet.GetUsedSize(), True) ' Write packet contents to screen Console.WriteLine(Text) Console.WriteLine(Contents) Return (0) End Function Sub Main() ' Create packet containing "Hello World" Dim Packet As mn.Packet = New mn.Packet("Hello World") DisplayContents(Packet, "Packet before inserting 'Big':") ' Create empty space after hello Packet.SetCursor(5) Packet.Insert(4) Packet.AddString(" Big", 0, 0) DisplayContents(Packet, "Packet after inserting 'Big':") ' Erase the word big Packet.Erase(6, 4) DisplayContents(Packet, "Packet after erasing 'Big':") ' Exit Console.WriteLine() Console.WriteLine("Press any key to exit...") Console.ReadKey() End Sub End Module