Struggling with REGASM and REGSVR32

Dec 5 2005 7:49 PM
Hi ... first post for me, but as I try to get to grips with C# and .net in general, I'll probably end up being a pain in the bum! :p I've got a strong background with asp/vbscript and various database languages, so while i'm not new to programming, per se, I am new to the .net framework and object orientated programming. I'm migrating some of my code from asp/vbscript to C# in a COM Callable wrapper and thought I'd start by creating a simple class just to test things out. Now, maybe my steps are wrong from this point on, but I BUILT the class in VS.net, then copied the resulting .dll into the windows/system32 folder. I registered this with REGASM without a problem, but REGSVR32 fails with "No entry point found". Now, this may be because I am way new to C# and such (particularly .dll construction), or the fact that I cobbled this together from two sources on the web ... but what is missing from this (TEST) code? [CODE] using System.Text.RegularExpressions; using System; /* csc /r:System.Text.RegularExpressions.dll,System.dll Validation.cs */ /* (]*>)(?=[^<]*)((?>[^?<]{0,40}))(?(<)(?!)|.*?)(?=) (]*>)(?=[^<]*)((?>(?:(?!\?|).){0,40}))(?!\<)(?:.*?)(?=) */ namespace KFML { /// /// public class V2 { private string msName; private int miHatSize; public V2() //default constructor needed to access from COM. { this.CustomerName = "John Doe"; miHatSize = 12; } public void Init(string Name) { this.CustomerName = Name; Random rand = new Random(); miHatSize = rand.Next(8)+7; } public string CustomerName { get { return msName; } set { msName = value; } } public int HatSize { get { return miHatSize; } } // Function to test for Positive Integers. public bool IsNaturalNumber(String strNumber) { Regex objNotNaturalPattern=new Regex("[^0-9]"); Regex objNaturalPattern=new Regex("0*[1-9][0-9]*"); return !objNotNaturalPattern.IsMatch(strNumber) && objNaturalPattern.IsMatch(strNumber); } } } [/CODE]