C # - can binary data be compiled into a module?

I want to include a large lookup table (100,000 of 3-byte values) inside a C # module.

Is there a compiler directive that will load binary data from an external file into a static string?

+3
source share
1 answer

Why not just include the file in the assembly as an embedded resource and then upload it with Assembly.GetManifestResourceStream? Then just load it from the stream into any desired data structure in memory.

+5
source

Source: https://habr.com/ru/post/1768295/


All Articles