Advertisement
ktostam450

C# Uppercase First Letter

Jan 3rd, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.30 KB | None | 0 0
  1. static string UppercaseFirst(string s)
  2.         {
  3.             if (string.IsNullOrEmpty(s))
  4.             {
  5.                 return string.Empty;
  6.             }
  7.         s.ToLower();
  8.             char[] a = s.ToCharArray();
  9.             a[0] = char.ToUpper(a[0]);
  10.             return new string(a);
  11.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement