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 StartsWith Example Syntax - C# String Function - Sample Code
Description:
Illustrates the C# Syntax for StartsWith.
Example Class Main:
using System; public class clsStartsWith { public void Main() { //**************************************************************************************** // Example #1: StartsWith(string) // Returns a Boolean value that indicates if the string starts with the specified string. //**************************************************************************************** Console.WriteLine("Example #1: stringtoexamine.StartsWith(string) "); string strStartsWithExample = "This is a test string"; Console.WriteLine(strStartsWithExample.StartsWith("This")); //Returns True //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; nameStartsWith CSharp_Syntax { class Program { static void Main(string[] args) { clsStartsWith myStartsWith = new clsStartsWith(); myStartsWith.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