Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 334 Bytes

GCop412.md

File metadata and controls

19 lines (12 loc) · 334 Bytes

GCop 412

"Don't hardcode a path. Consider using “AppDomain.CurrentDomain.GetPath()" instead."

Rule description

...

Example

File.AppendAllText(@"C:\PathString", "ContentString");

should be 🡻

File.AppendAllText(AppDomain.CurrentDomain.Getpath("C:\PathString"), "ContentString");