// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Runtime.InteropServices; class MainClass { [DllImport("D:\\IDEProjects\\VisualStudio\\StrDLL\\Release\\StrDLL.dll")] private static extern string dup(string s); public static void Main(string[] args) { string s1 = "abc"; string s2 = dup(s1); Console.WriteLine(s1 + "->" + s2); } }