Hi,
I have search the forum on delgate posts to get an answer to a confusing problem, but so far i was not able to find it, maybe someone else can help me out.
So far i understand the point and usage of delegates in VB.NET and my delegates work fine as long as I declare my delegates as "public" and the target procedure/function as "public shared".
According to this article ( http://vbnotebookfor.net/2007/08/24/introduction-to-vbnet-delegates/ section When and Where To Use a Delegate ) I understand that it is possible to invoke any function procedure private or public from any class with a delegate, even if both are declared as private (and that for me was the big advantage of delegates, accessing private and public functions / procedures form various classes without instantiating these classes as objects.), but i can't bring it to work. If every time i want to use a delegate, and therefore have to declare the target functions and procedures as public shared I can just use the class members without instantiating the class and.
Does someone know how private or public delegates can access private members from other classes without creating an object of the class?
Thanks,
Kind regards
I have search the forum on delgate posts to get an answer to a confusing problem, but so far i was not able to find it, maybe someone else can help me out.
So far i understand the point and usage of delegates in VB.NET and my delegates work fine as long as I declare my delegates as "public" and the target procedure/function as "public shared".
According to this article ( http://vbnotebookfor.net/2007/08/24/introduction-to-vbnet-delegates/ section When and Where To Use a Delegate ) I understand that it is possible to invoke any function procedure private or public from any class with a delegate, even if both are declared as private (and that for me was the big advantage of delegates, accessing private and public functions / procedures form various classes without instantiating these classes as objects.), but i can't bring it to work. If every time i want to use a delegate, and therefore have to declare the target functions and procedures as public shared I can just use the class members without instantiating the class and.
Does someone know how private or public delegates can access private members from other classes without creating an object of the class?
Thanks,
Kind regards