Kevin
Thu Jan 12 08:58:14 CST 2006
Hi Roby,
See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcrefthedelegatetype.asp
--
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
"Roby Eisenbraun Martins" <RobyEisenbraunMartins@discussions.microsoft.com>
wrote in message news:771292F2-5EF4-4945-AFCC-8EB814A6C68B@microsoft.com...
> Sorry about the missing information.
> I talking about NET2005 C#.
> I could you explain it a little more? What do you mean by that?
> Maybe a sample?
>
> Thank you,
> Roby Eisenbraun Martins
>
> "Lau Lei Cheong" wrote:
>
>> That's what delegate function is invented for. :)
>>
>> You can assign a function PROTOTYPE as parameter, and accept a function
>> that
>> "accept that kind of parameter" as parameter. (not intented pun)
>>
>> "Roby Eisenbraun Martins"
>> <RobyEisenbraunMartins@discussions.microsoft.com>
>> ¼¶¼g©ó¶l¥ó·s»D:40FD71A9-D274-4727-A074-D0DE24C4DE56@microsoft.com...
>> > Hi,
>> >
>> > How can I send a method as a parameter to be executed in a class?
>> > If possible without using delegate.
>> >
>> > public void MethodA()
>> > {
>> > // Code
>> > }
>> >
>> > public void ExecuteMethod( * MethodParam )
>> > {
>> > // Invoke the method parameter
>> > **MethodParam.invoke();
>> > }
>> >
>> > public void main()
>> > {
>> > // Call ExecuteMethod sending MethodA as a parameter
>> > ExecuteMethod( * MethodA );
>> > }
>> >
>>
>>
>>