Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

removing illlegal char from filename

public string RemoveInvalidChars(string filename)
{
    return string.Concat(filename.Split(Path.GetInvalidFileNameChars()));
}
public string ReplaceInvalidChars(string filename)
{
    return string.Join("_", filename.Split(Path.GetInvalidFileNameChars()));    
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #removing #illlegal #char #filename
ADD COMMENT
Topic
Name
5+8 =