events - Reference to a non-shared member requires an object reference (VB.net 2010) -


enter image description here

hi guys! need program problem, creating events. shows "reference non-shared member requires object reference". don't have idea how solve problem. thanks

it means did not create instance of object , trying call it's methods directly on non-shared member.

example:

public class foo   public sub bar(foobar string)     'some stuff   end sub end class 

you doing similar this:

foo.bar("foobar") 

when need this:

dim _foo new foo _foo.bar("some foobar") 

otherwise this:

public class foo   public shared sub bar(foobar string)     'some stuff   end sub end class 

then can do:

foo.bar("foobar") 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -