Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- //string we are comparing
- string quote = "The Broken Blades";
- //checking if string starts with "the", case sensitive
- bool startsWithThe = quote.StartsWith("the");
- Console.WriteLine(startsWithThe);
- //checking if string starts with "the", case insensitive because of StringComparison.CurrentCultureIgnoreCase
- bool startsWithTheAny = quote.StartsWith("the", StringComparison.CurrentCultureIgnoreCase);
- Console.WriteLine(startsWithTheAny);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement