Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
AnswerRe: Get Instance Of Class By Name Pin
Richard Deeming4-May-16 2:08
mveRichard Deeming4-May-16 2:08 
QuestionHelp please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 3:51
wilcoten29-Apr-16 3:51 
AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 3:57
mveOriginalGriff29-Apr-16 3:57 
AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 4:35
professionalZurdoDev29-Apr-16 4:35 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 6:10
wilcoten29-Apr-16 6:10 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 6:20
mveOriginalGriff29-Apr-16 6:20 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 20:36
wilcoten29-Apr-16 20:36 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 21:15
mveOriginalGriff29-Apr-16 21:15 
Read the documentation!
Read the error message!
Look at your code!

This isn't complex: even without seeing the actual error message it's pretty obvious that it's going to be several error messages:
"Text is a property, but is used like a method",
"No overload for method 'getLEBridgeNumber' takes 1 arguments"
"No overload for method 'ToInt32' takes 3 arguments"
"Non-invocable member 'System.Windows.Forms.Control.Text' cannot be used like a method"
Maybe more, depending on your spelling! :laugh

Now look at the line:
C#
LE_bridge_outcome.Text = numService.getLEBridgeNumber(Convert.ToInt32(Life_path_outcome,Text, Convert.ToInt32(Expression_outcome.Text())));

Let's have a look at some of the bits you have here:
C#
Expression_outcome.Text()
Text is a property, not a method - so you can't call it. Get rid of the "()" after it!
That gets rid of a few errors on it's own...
Now look at what else you have, and I'll rip out bits to make it more obvious:
C#
string s = MyMethod(Convert.ToInt32(stringA,stringB, Convert.ToInt32(stringC)));

Why are you trying to call the same method - Convert.ToInt32 - twice with different number of parameters? The first call has three, the second has one. The second is correct - the method does not have an overload that accepts three parameters - and that is exactly what one of your error messages is telling you. It even uses those exact words!

And your method almost certainly is expecting three parameters, not one!

So sort out your brackets:
C#
LE_bridge_outcome.Text = numService.getLEBridgeNumber(Convert.ToInt32(Life_path_outcome), Text, Convert.ToInt32(Expression_outcome.Text));


wilcoten wrote:
programming has to be fun, even the learning proggress.

Yes, it does: but that means you have to think about what you are doing, not just randomly throw stuff together and hope it works! Laugh | :laugh:
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...


modified 30-Apr-16 10:24am.

GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 23:17
wilcoten29-Apr-16 23:17 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 23:50
mveOriginalGriff29-Apr-16 23:50 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten30-Apr-16 4:05
wilcoten30-Apr-16 4:05 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff30-Apr-16 4:30
mveOriginalGriff30-Apr-16 4:30 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten30-Apr-16 4:46
wilcoten30-Apr-16 4:46 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff30-Apr-16 5:06
mveOriginalGriff30-Apr-16 5:06 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten30-Apr-16 5:37
wilcoten30-Apr-16 5:37 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff30-Apr-16 5:59
mveOriginalGriff30-Apr-16 5:59 
AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 6:32
professionalZurdoDev29-Apr-16 6:32 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 8:33
wilcoten29-Apr-16 8:33 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 8:52
professionalZurdoDev29-Apr-16 8:52 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 9:02
wilcoten29-Apr-16 9:02 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 9:08
professionalZurdoDev29-Apr-16 9:08 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 9:21
wilcoten29-Apr-16 9:21 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 9:32
professionalZurdoDev29-Apr-16 9:32 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 11:07
wilcoten29-Apr-16 11:07 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
Brisingr Aerowing29-Apr-16 11:22
professionalBrisingr Aerowing29-Apr-16 11:22 

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.