tags:

views:

42

answers:

1

I want to include a large look-up 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 ?

+5  A: 

Why not just include the file into the assembly as an embedded resource, and then load it using Assembly.GetManifestResourceStream? Then just load it from the stream into whatever in-memory data structure you want.

Jon Skeet
This looks like it will do the trick. Thanks.
Martin