private void firstCharToUppercase(Prinicpal principal)
UserPrinicpal user = principal as UserPrincipal;
As clearly denoted by the documentation,
SamAccountName returns a string.
However, by using an indexer, you are retrieving the first character as type
char, not type
You need to call
ToString() on the result first.