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 Replace()
Description:
Illustrates using VB.NET Replace() Code Example.
Example Class:
Public Class clsReplace Public Sub Main() '**************************************************************************************** ' Example #1: Replace(string, startIndex[, length]) ' Returns the specified number of characters from the string starting ' at the specified position. If the length is not specified, all of the ' characters to the end of the string are returned '**************************************************************************************** Console.WriteLine("Example #1: Replace(strField, 2, 3)") Dim strField As String = "123456" Console.WriteLine(Replace(strField, 2, 3)) 'Returns 234 '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 myclsReplace As New clsReplace myclsReplace.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