String start with
In this chapter you will learn:
Start with another string
In the same way we can use StartWith, EndWith methods.
using System;//from j a v a 2 s . com
class Sample
{
public static void Main()
{
string s = "java2s.com";
Console.WriteLine(s.StartsWith("java"));
Console.WriteLine(s.EndsWith("java"));
}
}
The output:
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » String