Click here to Skip to main content
15,895,370 members
Home / Discussions / C#
   

C#

 
QuestionConnection error Pin
Muammar©30-Sep-07 22:50
Muammar©30-Sep-07 22:50 
AnswerRe: Connection error Pin
Christian Graus30-Sep-07 23:16
protectorChristian Graus30-Sep-07 23:16 
GeneralRe: Connection error Pin
Muammar©1-Oct-07 0:05
Muammar©1-Oct-07 0:05 
QuestionCargo.mdf database Pin
pierrecor30-Sep-07 22:49
pierrecor30-Sep-07 22:49 
AnswerRe: Cargo.mdf database Pin
Christian Graus30-Sep-07 23:16
protectorChristian Graus30-Sep-07 23:16 
GeneralRe: Cargo.mdf database Pin
pierrecor30-Sep-07 23:27
pierrecor30-Sep-07 23:27 
QuestionHow to call a class or function accoring to a given text name? Pin
Seraph_summer30-Sep-07 22:43
Seraph_summer30-Sep-07 22:43 
AnswerRe: How to call a class or function accoring to a given text name? Pin
Pete O'Hanlon30-Sep-07 22:56
mvePete O'Hanlon30-Sep-07 22:56 
OK - assuming that your buttons and functions have better names than A, B and C, you could use reflection to handle this. Off the top of my head, I would expect that you could handle this with:
private void ButtonHandler(object sender, EventArgs e)
{
  string name = ((Button)sender).Name;
  this.GetType().InvokeMember(name, BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance, null, this, new object[] { });
}
Then all you would need to do is wire up your buttons to this one event handler.

Deja View - the feeling that you've seen this post before.

GeneralRe: How to call a class or function accoring to a given text name? Pin
Seraph_summer30-Sep-07 23:10
Seraph_summer30-Sep-07 23:10 
GeneralRe: How to call a class or function accoring to a given text name? Pin
Pete O'Hanlon30-Sep-07 23:22
mvePete O'Hanlon30-Sep-07 23:22 
Question.NET Ftp class problem Pin
Stevo Z30-Sep-07 22:23
Stevo Z30-Sep-07 22:23 
AnswerRe: .NET Ftp class problem Pin
partymonkey1-Oct-07 2:49
partymonkey1-Oct-07 2:49 
GeneralRe: .NET Ftp class problem Pin
Stevo Z1-Oct-07 3:07
Stevo Z1-Oct-07 3:07 
GeneralRe: .NET Ftp class problem Pin
TJoe1-Oct-07 3:10
TJoe1-Oct-07 3:10 
GeneralRe: .NET Ftp class problem Pin
Stevo Z1-Oct-07 3:11
Stevo Z1-Oct-07 3:11 
GeneralRe: .NET Ftp class problem Pin
Stevo Z1-Oct-07 3:17
Stevo Z1-Oct-07 3:17 
GeneralRe: .NET Ftp class problem [modified] Pin
TJoe1-Oct-07 3:20
TJoe1-Oct-07 3:20 
GeneralRe: .NET Ftp class problem Pin
Stevo Z1-Oct-07 3:44
Stevo Z1-Oct-07 3:44 
Questionitem in combobox Pin
justintimberlake30-Sep-07 22:20
justintimberlake30-Sep-07 22:20 
AnswerRe: item in combobox Pin
Stevo Z30-Sep-07 22:30
Stevo Z30-Sep-07 22:30 
QuestionHow to select and edit a line with Graphics GDI+ in C#? Pin
Seraph_summer30-Sep-07 22:11
Seraph_summer30-Sep-07 22:11 
AnswerRe: How to select and edit a line with Graphics GDI+ in C#? Pin
Martin#30-Sep-07 22:25
Martin#30-Sep-07 22:25 
AnswerRe: How to select and edit a line with Graphics GDI+ in C#? Pin
Guffa30-Sep-07 22:43
Guffa30-Sep-07 22:43 
GeneralRe: How to select and edit a line with Graphics GDI+ in C#? Pin
Seraph_summer30-Sep-07 22:53
Seraph_summer30-Sep-07 22:53 
GeneralRe: How to select and edit a line with Graphics GDI+ in C#? Pin
Pete O'Hanlon30-Sep-07 22:58
mvePete O'Hanlon30-Sep-07 22:58 

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.