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 Remove()
Description:
Illustrates using VB.NET Remove() Code Example.
Example Class:
Public Class clsRemove Public Sub Main() '**************************************************************************************** ' Example #1: Remove(startIndex, count) ' Returns a string with the specified number of characters removed starting at startIndex. ' If no Count is specified, the remainder of string is removed '**************************************************************************************** Console.WriteLine("Example #1: Remove(startIndex, count) ") Dim strRemoveExample As String = "This is a test string" Dim intIndexRemove As Integer = 0 ' First find position of word test intIndexRemove = strRemoveExample.IndexOf("test") ' Remove rest of string starting with word "test" Console.WriteLine(strRemoveExample.Remove(intIndexRemove)) '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 myclsRemove As New clsRemove myclsRemove.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