2 using System.Runtime.InteropServices;
8 static extern int setenv(string name, string value, int overwrite);
10 static extern IntPtr getenv(string name);
14 string name = "mono_test";
17 setenv (name, value, 1);
18 string ret = Marshal.PtrToStringAnsi (getenv (name));
23 catch (EntryPointNotFoundException) {
24 /* setenv is not available on some platforms */
26 catch (DllNotFoundException) {
27 /* libc might not be accessible by that name */