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
C-Sharp InStrRev Example Syntax - C# InStrRev - Sample Code
Description:
Illustrates the C# Syntax for InStrRev.
Example Class Main:
using System; public class clsInStrRev { public void Main() { //**************************************************************************************** // Example #1: InStrRev(stringcheck,stringmatch,start,comparemethod) - returns integer // of the position of the first occurrence of one string within another, starting from the // right side of the string. // // stringcheck - Required. String expression being searched. // stringmatch - Required. String expression being searched for. // start - Optional. Numeric expression setting the one-based starting position for each // search, starting from the left side of the string. If Start is omitted then –1 is used, // meaning the search begins at the last character position. Search then proceeds from right // to left. // comparemethod - Optional - integer indicating binary or text //**************************************************************************************** Console.WriteLine("Example #1: InStrRev(stringcheck,stringmatch,start,comparemethod) "); string strString1 = "Hello World"; // Return Uppercase Console.WriteLine((strString1.LastIndexOf("l") + 1).ToString()); //Returns 10 //write blank line to make output easier to read Console.WriteLine(); //Prevent console from closing before you press enter Console.ReadLine(); } }
Example Class Program:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CSharp_Syntax { class Program { static void Main(string[] args) { clsInStrRev myInStrRev = new clsInStrRev(); myInStrRev.Main(); } } }
Home
News
Presenters
Register
Contact
Categories
Titles
Converter
Code Samples
C# ASP.NET
C# Console
HTML
JavaScript
SQL Server
VB ASP.NET
VB Console