Feb 26, 2010 10:11 AM|atconway|LINK
Be careful regardless of using a 'module' in VB.NET. I typically do not recommend it. It the equivalent of a 'Public' class with 'Shared' methods which means it does not have to be instantiated and does not fall into the lines of good OOP. There are valid
situations for needing a class that has all methods Shared (like a UI utility class with no behavior other than to support the UI), and in those cases, mark the class Public and then elevate the needed properties or methods to 'Public Shared' so they can be
accessed directly. The Module type is there in .NET IMO as a grandfathered file type from the VB6 days to help make programmers more comfortable making the transition to .NET.
Now back to your issue... If you feel there is something intrinsically wrong the the class file containing the code try the following. (Backup your
entire project 1st)Copy out all of the code from the class, delete the class from the project, Goto
Solution Explorer right-click and select Add->New Item,
select Class, give it the proper name, and then paste back in all of your code.
Essentially what you will have done is recreated the exact same class, but by using a class created in VS.NET 2008 instead of a file that may have been originally created in an older version of VS.NET. Now I have seen this solution be quite helpful for
.aspx pages that have the .designer, and .vb files attached, but have not seen it to be an issue to often with just plain class files, but it is worth a try, and at least will confirm there is nothing wrong with the file.
Also, confirm that you do have VS.NET 2008 and SP1 installed. SP1 is a must, because when you being to talk about IDE Intellisense issues, etc it may be beyond the project.