• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

c# indentiying the first two characters of a string

Need Help
  I have a string and I want to find out if the first two characters are equal to a certain value when passed in. for example

"Employee".......are the first two letters of this string "EM"
0
vcurtis
Asked:
vcurtis
1 Solution
 
AndyAinscowFreelance programmer / ConsultantCommented:
String s = "Employee";
            bool b = s.ToUpper().StartsWith("EM");
b is true in this case
0
 
vcurtisAuthor Commented:
Thanks Andy
  That is exactly what I needed
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now