VB.NET

Moderators: seancampbell
Number of threads: 4020
Number of posts: 10026

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
class library Posted by kmas3750 on 11 Jul 2009 at 6:07 PM
Hi, hope I'm posting in the right forum.
Got a question on making a general functions class library that will be used in several applications and asp pages, sometimes running at the same time.
I've looked at a lot of samples on the web and they all show you to create an instance of the classlibrary namespace or the classlibrary class.

IE.
dim obj2 as new mycompany.mynamespace.myclass
dim n2 as integer
n2 = obj2.somefunction(...)

What I did was create my class library and put a class in it and declared a function as sharred, then created my dll.
I don't have to create an instance of it and I can use it like the net framework by just coding
n2 = mycompany.mynamespace.myclass.somefunction(...).

Am I going to run into problems doing it this way?
If so how can it be done?
The net framework does this, I mean once I imports it I don't have to make an instance of it in every function.

All the samples I've seen about class libraries do not use the shared keyword.

Could some explain this to me?

Thanks for allowing me to post. Mark.





Report
Re: class library Posted by seancampbell on 16 Jul 2009 at 6:28 AM
Report
Re: class library Posted by kmas3750 on 16 Jul 2009 at 7:13 AM
Thanks, keep us up to date.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.