title: Is there a method in C# to check if a string is a valid identifier
body: <p>In Java, there are methods called <code>isJavaIdentifierStart</code> and <code>isJavaIdentifierPart</code> on the Character class that may be used to tell if a string is a valid Java identifier, like so:</p>
  
  <pre><code>public boolean isJavaIdentifier(String s) {
    int n = s.length();
    if (n==0) return false;
    if (!Character.isJavaIdentifierStart(s.charAt(0)))
        return false;
    for (int i = 1; i &lt; n; i++)
        if (!Character.isJavaIdentifierPart(s.charAt(i)))
            return false;
    return true;
  }
  </code></pre>
  
  <p>Is there something like this for C#?</p>