Search
 
SCRIPT & CODE EXAMPLE
 

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()));    
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c sharp check if key in dictionary 
Csharp :: c# how to open file explorer 
Csharp :: how to get desktop name in c# 
Csharp :: how to convert a number to 2 decimal places in c# 
Csharp :: unity pause scene 
Csharp :: struct constructor c# 
Csharp :: uni valued tree 
Csharp :: mvc input type file 
Csharp :: Generate UUID in c# 
Csharp :: Create gaps / headers between variables in the unity inspector 
Csharp :: c# how to exit program 
Csharp :: exit a method c# 
Csharp :: coroutine not eaffected by time.timescale unity 
Csharp :: c# rename file add 
Csharp :: unity read from text file 
Csharp :: set particle system start colour + random between two 
Csharp :: how to have is trigger on but also have collisions 
Csharp :: basic movement script unity 
Csharp :: bubble sort in c# 
Csharp :: How can you learn C# on your own 
Csharp :: unity change tmp text from script 
Csharp :: how to convert from hexadecimal to binary in c# 
Csharp :: c# random generator 
Csharp :: array.convertall 
Csharp :: c# LCP 
Csharp :: how to deactivate objects through scripts in unity 
Csharp :: where is c# used 
Csharp :: c# compile code at runtime 
Csharp :: wpf set color in code 
Csharp :: c# size of enum 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =