You're right, shame on me, foreach is "read-only" :-)
 
by Kohl
Vitória - ES - Brazil


De: [email protected] [mailto:[EMAIL PROTECTED] Em nome de Babu Aboobacker
Enviada em: sábado, 23 de julho de 2005 10:06
Para: [email protected]
Assunto: Re: ENC: [Microsofts_C_Sharp] Vb to C#

You can't modify the control varibales in foreach statement. Try to do the same with some temporary variables.
 
HTH
Aboobacker
----- Original Message -----
Sent: Saturday, July 23, 2005 9:22 PM
Subject: RES: ENC: [Microsofts_C_Sharp] Vb to C#

I'm not shure about, did you try ?
 
by Kohl
Vitória - ES - Brazil


De: [email protected] [mailto:[EMAIL PROTECTED] Em nome de Syed Nadeemulla Hussaini
Enviada em: sábado, 23 de julho de 2005 07:07
Para: [email protected]
Assunto: Re: ENC: [Microsofts_C_Sharp] Vb to C#


Thanks

the idea works , One thing the control can't be moved
to other locations,I mean
Ctl.Top*=6;
Ctl.Left *= 5;

etc

isn't working what would be the problem.
--- News byKohl <[EMAIL PROTECTED]> wrote:

> Oops, I think this way works better:

> Control ctl = new Control;
> foreach (ctl in this.Controls)
>     if (ctl is TextBox)
>         (TextBox)ctl.Text = "Hello";

> by Kohl
> Vitória - ES - Brazil
>
>   _____ 
>
> De: News byKohl [mailto:[EMAIL PROTECTED]
> Enviada em: sábado, 23 de julho de 2005 05:10
> Para: '[email protected]'
> Assunto: RES: [Microsofts_C_Sharp] Vb to C#
>
>
> Control ctl = new Control;
> foreach (ctl in this.Controls)
>     if ((ctl as TextBox) != null)
>         ctl.Text = "Hello";


> by Kohl
> Vitória - ES - Brazil
>
>   _____ 
>
> De: [email protected]
> [mailto:[EMAIL PROTECTED] Em nome
> de Nadeem
> Enviada em: sábado, 23 de julho de 2005 03:49
> Para: [email protected]
> Assunto: [Microsofts_C_Sharp] Vb to C#
>
>
> Please do convert the following VB code to C#
>
> Dim Ctl as Control
>
> For each Ctl in Me.Controls
>     if typeof Ctl is Textbox then
>        Ctl.text = "Hello"
>     end if
> Next
>
>
>
>
>
>
>   _____ 
>
> YAHOO! GROUPS LINKS
>
>
>      
> *      Visit your group "Microsofts_C_Sharp
> <http://groups.yahoo.com/group/Microsofts_C_Sharp> "
> on the web.
>  
>
> *      To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>
<mailto:[EMAIL PROTECTED]>
>
>  
>
> *      Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
>   _____ 
>
>
>


Syed Nadeemulla Hussaini
Frequency Management Project,
Detecon Al Saudia Co. Ltd. ,
P.O.Box No 22135,
Riyadh 11495.
K.S.A.

Tele : Office 00966 -1-2638098
         Resi   00966 - 1-4034842







           
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs



YAHOO! GROUPS LINKS




Reply via email to