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
[B]Question asked by visitor swiss[/b]
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
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#