I am just wondering if I am correct in thinking that if I add the ALT codes to the following code, that people would not be able to try make characters with the ALT codes
If so then wouldn't it be simpler to do something like this:
Code:
public bool ValidName(string Name)
{
if (Name.IndexOfAny(new char[14] {[COLOR="Red"] ' ', '[', ']', '#', '*', '\\', '/', '<', '>', ':', '"', '|', '?', '='[/COLOR]}) > -1) //this is all windows folder invalids characters
{
return false;
}
else
{
return true;
}
}
Code:
public bool ValidName(string Name)
{
if (Name.IndexOfAny(new char[14] {'insert english alphabet'}) > -1) //this is all windows folder invalids characters
{
return true;
}
else
{
return false;
}
}