VB .NET - no static methods?

Started by
2 comments, last by AliasNotFound 21 years, 2 months ago
Looks like VB .net doesn''t let you declare static methods as members of a class? Is there another way to do this other than putting the method in a module file? I thought vb .net was supposed to be fully OOP but if I can''t encapsulate everything into classes what does this mean? I must be missing something here. We are about to migrate our projects from Visual FoxPro into .NET and I am being forced to use VB .NET because the other developer doesn''t want to learn C#, which I already know. I hate office politics. Anyway, static methods in VB .NET?
Advertisement
I believe the keyword you are looking for is Shared.


"I know very well who Satan is: He is freedom. He is the uncontrolled, the incalculable, the antithesis of order and discipline, the antithesis of the legalism of outer space.... We know where a planet will be in twelve years, four months and nine days. But we don''t know where a butterfly will have flown one minute hence. Therefore the butterfly is of Satan."
-- Jens Bjørneboe
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Unlike Pascal and HTML, VB.NET is still only partially OOP. You where in HTML you might go start>; in vb you would go VbStartMe(true).
quote:Original post by Arild Fines
I believe the keyword you are looking for is Shared.


Thanks Arild, that did the trick.

This topic is closed to new replies.

Advertisement