-
Getting error methods cannot be declared as static
When I am trying to write a fucntion as static it is showing me an error called as methods cannot be declared as static..public static function whereami (byval value as boolean) this is giving me an error..!!
can sombody help..
thanks,
Swiss
Question asked by visitor swiss
-
Junior Member
Re: Getting error methods cannot be declared as static
Try using the "Shared"-keyword instead of static.
E.g. Public Shared Function Foo(ByVal value as Boolean) as Boolean
-
Contributing Member
Re: Getting error methods cannot be declared as static
static is replaced with shared in vb.net but in c# static only..
-
Re: Getting error methods cannot be declared as static
It seems u inherited from the old VB 6.0. thats why this problem.
use SHARED if writing in vb.net
but still can use the same STATIC keyword if u are into c#
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules