파일 경로 체크1 C# 파일 경로 유효성 체크 파일 경로 체크 시 보안성 관련 문제를 해결하다가 찾은 소스경로로 사용할 수 없는 문자가 있는지 확인해서 빈 문자열로 바꿔줌 public string ReplacePath(string s){Regex regex = new Regex(string.Format("{0}", Regex.Escape(new string(Path.GetInvalidPathChars())))); s = regex.Replace(s, "");return s;} MSDN 권고 소스임.. 2018. 2. 26. 이전 1 다음