Progress Monitor for IdealProgrammer.com
Take Swift, Intelligent, Massive, Planned, Loving, Effective (S.I.M.P.L.E.) Action to Transform Self into Ideal
Skip Repetitive Navigational Links
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console
Please login
VB.NET Insert()
Description:
Illustrates using VB.NET Insert() Code Example.
Example Class:
Public Class clsInsert Public Sub Main() '**************************************************************************************** ' Example #1: Insert(startIndex, string) ' Returns a string with the specified string inserted beginning at the specified position. '**************************************************************************************** Console.WriteLine("Example #1: Insert(startIndex, string) ") Dim strInsertExample As String = "This is a test string" Dim intIndex As Integer = 0 ' First find position of word test intIndex = strInsertExample.IndexOf("test") ' Insert "simple" before "test" Console.WriteLine(strInsertExample.Insert(intIndex, "simple ")) 'write blank line to make output easier to read Console.WriteLine() 'Prevent console from closing before you press enter Console.ReadLine() End Sub End Class
Example Module:
Module Module1 Sub Main() Dim myclsInsert As New clsInsert myclsInsert.Main() End Sub End Module
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console