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

VS 2010 Shared Function

$
0
0
In my module, I have this code..

Code:

        Public Shared Function GetNumber() As Integer
            Dim num As Integer= 0
            num = TestDalc.GetNumber(Me)
            Return num
        End Function

But I have this error message:

'Me' is valid only within an instance method.

What I'm trying to do is pass the value of 'Me' (Me.Id, Me.Message) and get the return ID from the Function. how can I do that? do you have sample of code please?

Viewing all articles
Browse latest Browse all 27554

Trending Articles



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