![]() |
|
[C#] [C#] Mono - How do I delete resource file(s) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] [C#] Mono - How do I delete resource file(s) (/showthread.php?tid=6116015) |
[C#] Mono - How do I delete resource file(s) - Grooty - Oct 16, 2020 How to delete resource from name? Code public static void RemoveResource(AssemblyDefinition asmDefinition)1 - Doesn't delete all resources by index. 2 - How to delete resource files by resource file name? The resources contain files: FileText.txt, MusicList.wav I need to delete resources by name namely: FileText and MusicList RE: [C#] Mono - How do I delete resource file(s) - Lookdadon - Aug 18, 2024 Well i didnt understand your couples of first lines but what you want to do is using txt file and wav file and then delete them after? its sample but tricky: be sure to dispose correctly these resources: you can use IDisposable interface and implementing a Dispose function or in the case of files you can use them inside a using block Code using(StreamReader sr = new StreamReader(path/to/your/txtfile.txt)or Code StreamReader sr = new StreamReader(path/to/your/txtfile.txt)then Code if(File.Exist(path/to/your/file) |