Click here to Skip to main content
15,891,657 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# variables with variabel part Pin
Larantz2-May-06 9:09
Larantz2-May-06 9:09 
GeneralRe: C# variables with variabel part Pin
JelleM2-May-06 9:32
JelleM2-May-06 9:32 
GeneralRe: C# variables with variabel part Pin
Dan Neely2-May-06 9:44
Dan Neely2-May-06 9:44 
GeneralRe: C# variables with variabel part Pin
JelleM2-May-06 10:00
JelleM2-May-06 10:00 
GeneralRe: C# variables with variabel part Pin
CWIZO2-May-06 10:11
CWIZO2-May-06 10:11 
GeneralRe: C# variables with variabel part Pin
JelleM2-May-06 10:19
JelleM2-May-06 10:19 
GeneralRe: C# variables with variabel part Pin
Dan Neely2-May-06 10:17
Dan Neely2-May-06 10:17 
GeneralRe: C# variables with variabel part Pin
Josh Smith2-May-06 10:18
Josh Smith2-May-06 10:18 
This sounds like the type of thing that people do in scripted languages, such as JavaScript. If that is where you are coming from, it's time to abandon that way of thinking because strongly typed (static) languages don't dance that funky jig.

What you could do is create a method like this:
public Button GetButtonByText( string text );

and make it search through the Controls on the form/page looking for a button with the specified text. But that is hacky and crass. You're much better off doing what the other replies mentioned: put the buttons into an array and index into it via the loop index.

Josh
GeneralRe: C# variables with variabel part Pin
JelleM2-May-06 10:23
JelleM2-May-06 10:23 
GeneralRe: C# variables with variabel part Pin
Ravi Bhavnani2-May-06 12:47
professionalRavi Bhavnani2-May-06 12:47 
GeneralRe: C# variables with variabel part Pin
JelleM3-May-06 5:05
JelleM3-May-06 5:05 
GeneralRe: C# variables with variabel part Pin
Larantz3-May-06 10:42
Larantz3-May-06 10:42 
GeneralRe: C# variables with variabel part Pin
JelleM3-May-06 10:55
JelleM3-May-06 10:55 
GeneralRe: C# variables with variabel part Pin
Larantz4-May-06 7:55
Larantz4-May-06 7:55 
GeneralRe: C# variables with variabel part Pin
Larantz4-May-06 9:54
Larantz4-May-06 9:54 
QuestionHovering Mouse Pin
IceWater422-May-06 8:24
IceWater422-May-06 8:24 
AnswerRe: Hovering Mouse Pin
Pablo Hernandez Valdes2-May-06 8:40
Pablo Hernandez Valdes2-May-06 8:40 
GeneralRe: Hovering Mouse Pin
IceWater422-May-06 12:24
IceWater422-May-06 12:24 
Questionhow to SetParameterValue to crystal sub-report using c# Pin
shabonaa2-May-06 8:01
shabonaa2-May-06 8:01 
QuestionBacking up my source Pin
Tom Wright2-May-06 7:16
Tom Wright2-May-06 7:16 
QuestionReports using Business Object in C# Pin
Neel072-May-06 6:54
Neel072-May-06 6:54 
AnswerRe: Reports using Business Object in C# Pin
shabonaa2-May-06 8:46
shabonaa2-May-06 8:46 
QuestionForm flicks when resize on Timer_Tick Pin
freshonlineMax2-May-06 6:49
freshonlineMax2-May-06 6:49 
AnswerRe: Form flicks when resize on Timer_Tick Pin
CWIZO2-May-06 8:42
CWIZO2-May-06 8:42 
QuestionObject Reference Error while accessing a treenode from a context menu event Pin
Jonathen Scalet2-May-06 5:57
Jonathen Scalet2-May-06 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.