Mark Tabor

Mark Tabor

  • 585
  • 2k
  • 460.8k

I have two arrays in c#

Sep 20 2017 3:48 PM
I have two arrays in c# bascially i am creating a function to check either my string contains at least one lowercase one uper case and one digit so i take a string and then convert it to lowercase and uppercase and then covert them to array and then comparing to check if atleast one item like one upercase one lowercase one digit exists then success message shown
 
The problem is here
if i input as a main string as "acg123"
 
and my uppercase string would contain "ACG123" now for the first three characters it works fine like a and A are different and C and c are differnet but when it comes to number it makes the condition true as in both of them we have 123, so how can i compare just characters from the string array instead of any number  

Answers (7)