// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; namespace COM { public class MainClass { public static void Main(string[] args) { CoS cosnat = new CoSClass(); IS snat = (IS)cosnat; int a = 123; int b = 456; int c = snat.Add(a, b); Console.WriteLine(c); string s = "ABC"; string s2 = snat.Dup(s); Console.WriteLine(s2); snat.Iv = 123; snat.Sv = "ABC"; snat.M(); int iv = snat.Iv; string sv = snat.Sv; Console.WriteLine(iv + " " + sv); } } }