Comact framework: C#: Index of the sender control to focus next control

Hi there,

How do I find out the index of the sender control and focus the next control without using the name of the contol?

I know how to do it in VB.NET [Me.Panel1.Controls.Item(Me.Panel1.Controls.IndexOf(sender) + 1).Focus()]

Do not know how to do it C#. Could you guys please help with this. Any help is greately appreciated.

Thanks,
Prasad.

[385 byte] By [wildcat] at [2007-12-16]
# 1

Not commenting on the context of your problem but a straight translation of default properties to indexers can be achieved by replacing
.Item(x)
with
[x]

If you also replace Me with this, you have your answer.

There are numerous online converters including some that I link from here:
http://www.danielmoth.com/Blog/2005/03/using-c-from-vb-level-000.html

Cheers
Daniel

DanielMoth at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...