Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27353

Shared functions

$
0
0
A basic question, but for someone who does not know the answer, it's not that basic.

Looking at Object orientated programming a function within a class can be defined as

Public Shared function Nameoffunction()

In this case the function can be called without creating an instance of it.

However, when simply creating Module containing sub routines / functions

Public function nameoffunction()

Will suffice. This can also be called in the same way,

Hence what is the difference.

Viewing all articles
Browse latest Browse all 27353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>