[Mono-list] loading a library

Mathias Hasselmann mathias.hasselmann@gmx.de
Thu, 14 Nov 2002 20:56:12 +0100


Lehel wrote:
> 
> 
> If I wanted to load a library on a UNIX type system how would I do 
> that?  Is there a special attribute like [DLLImport] ?

The attribute is called excactly like that. And if you used with library 
names like "foobar" instead of referencing "foobar.dll" or 
"libfoobar.so" the attribute even will work arround those subtile 
differences in library naming found across platforms.

> Also,  how do I detect the type of operating system I’m on?  Is there a 
> GetSystem call or something?  Thanks.

Look for "System.Environment.OSVersion".

Ciao,
Mathias