The first improvement you could make is to get rid of that completely.
If the string does not contain the char value 255, then dr("name") will always contain parts(0) and (presumably) the revised strName value will be discarded - because the final value in the loop determines the value of the array element.
So I assume that is not what you are trying to do...
What are you trying to achieve?
The reason I ask is that unicode characters (which is what strings are made up of) are not necessarily just in the range 0..255 If you are after printable characters only then it's relatively simple - but I would probably use a Regex
"I dont want to declare the special characters. I shud use ch(x) where x=126 to 255 ...I want to basically check for the special characters in a string. If found replace them with a space else i want to store the string in my datarow dr."
What about the special characters below space? Don't you want to get rid of them too?
Can I suggest that you start with a list of *permitted* characters and use a regex to replace all the characters which aren't on it? It's a simpler solution:
Public Dim regex As Regex = New Regex("[^\w\.\,!""$%^&*\(\)-_+=::@']")
Public Dim regexReplace As String = " "
Dim result As String = regex.Replace(InputText,regexReplace)