Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
70 Points
10 Posts
Jun 10, 2009 07:58 PM|LINK
Since you are using substring to get a single character, you can just subscript the string directly for that character. Like this:
returnParams.Name1LeadingSpaces = false; string strTest1 = "ABC123"; if (strTest1[0] == ' ') { returnParams.Name1LeadingSpaces = true; }
soeldk
Member
70 Points
10 Posts
Re: Substring question
Jun 10, 2009 07:58 PM|LINK
Since you are using substring to get a single character, you can just subscript the string directly for that character. Like this:
returnParams.Name1LeadingSpaces = false; string strTest1 = "ABC123"; if (strTest1[0] == ' ') { returnParams.Name1LeadingSpaces = true; }