Good time of day. There is a folder with files in the dll project. How to access these files from the dll class, if not to make them resources (so as not to know in advance the number of these files - otherwise you need to use reflection)?
Asked
Active
Viewed 90 times
0

Alex Pertenava
- 17
- 4
-
2If you *bake* it into the DLL, then these are resources. If you don't put them there, these files must be loaded like any other through the file system and you must ensure that these files are deployed in conjunction with your library (e.g. set in properties to Content and CopyIfNewer and adopt your installer project). – Oliver Nov 23 '21 at 08:44
-
@Oliver, that is, if you don't copy files next to the dll every time, then only resources? – Alex Pertenava Nov 23 '21 at 08:50
-
Yes, if you like to inline additional files into an assembly then resources are the way to go. – Oliver Nov 23 '21 at 09:05
-
2And if you like to iterate through all resources available within an assembly at runtime, take a look at [this answer](https://stackoverflow.com/a/2041049/1838048) – Oliver Nov 23 '21 at 09:08