|
Try this:
txtNumber.Text=YourNo(Number).ToString();
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
hi !
it doesn't work . did you test it ?
Regards ,
s_mostafa_h
|
|
|
|
|
No sorry,
It was an idea
What error message you get?
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
The code that Elina suggested is basically correct. What you have to do is just substitute the "Number" with the value you want to send into the function.
What do you mean by "doesn't work", really? What happens? Do you get an error message?
What does the "..." in the function represent? Do you use the value of the parameter at all?
---
b { font-weight: normal; }
|
|
|
|
|
private int YourNo(int Number)<br />
{<br />
int x = 10;<br />
int y = 5;<br />
Number=(X+Y)*100;<br />
return Number;<br />
}<br />
<br />
<br />
<br />
private void calculate_Click((object sender, EventArgs e)<br />
{<br />
txtNumber.Text= YourNo(Convert.ToInt32(txtNumber.Text)).ToString();<br />
}
|
|
|
|
|
hi there !
thnks for ur reply !
albCode wrote: txtNumber.Text= YourNo(Convert.ToInt32(txtNumber.Text)).ToString();
Why "YourNo(Convert.ToInt32(txtNumber.Text))..." ? , I want to use of "Number Parameter " , when I clicked the button ,
Regards ,
s_mostafa_h
|
|
|
|
|
mostafa_h wrote: Why "YourNo(Convert.ToInt32(txtNumber.Text))..." ?
txtNumber.Text is parameter which u give in YourNo
|
|
|
|
|
but I want to use the return Value "Number" in Event .
txtNumber.Text= YourNo(Number).ToString();
but I have this Error message :
the name 'Number' doesn't exist in the current context .
Regards ,
s_mostafa_h
|
|
|
|
|
the problem was solved as following :
private int YourNo(out int Number)
{
...
Number=(X+Y)*100;
return Number;
}
and :
private void calculate_Click((object sender, EventArgs e)
{
int output;
YourNo(out output);
txtNumber.Text=output.ToString();
}
Regards ,
s_mostafa_h
|
|
|
|
|
Hello i have a C# program which loads a excel file and read its contents. I want to know how can my program be notified if some one modifies the file i am using so that i get the new data. I can handle events for excel object which opened through my program but what if some other user opens the files and modifies and i want that notification. Is there way i can send a remoting message from excel event handlers to C# application?. If so any help or code snippets will be great help
venky
|
|
|
|
|
Why don't you just use a FileSystemWatcher to watch files in that directory?
Logifusion[^]
|
|
|
|
|
well,i can try that but is there any other way? Is there a way to send a remoting call from Excel event handlers?
|
|
|
|
|
what should i do to make my label accepting multiple line of text.
I remember in vb5 we can resize the label the way we want to and the text will wrap automatically too.
Donkaiser
|
|
|
|
|
set autosize to false
Donkaiser
|
|
|
|
|
Hey, I know there is suppose to be a class System.Runtime.Serialization.Formatters.SOAP.SoapFormatter
but I don't even have the namespace System.Runtime.Serialization.Formatters.SOAP, what's the problem?
NaNg.
|
|
|
|
|
You need to reference a separate assembly, with a name like System.Runtime.Serialization.Formatters.SOAP
Josh
|
|
|
|
|
|
Is there any way possible to post a small icon in a cell when your view property on your listview is set to "details". I was trying to highlight my cells but the color doesn't hold when i scroll over it or select it(it reverts back to white) so I thought maybe i could just add an icon.
|
|
|
|
|
|
lulu0441 wrote: do it in C++
You posted this same question in three different forums. Why? It's clearly a homework assignment to be done in C++.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Can you do it in any ways ?
|
|
|
|
|
lulu0441 wrote: Can you do it in any ways?
Probably, but I won't. If people enable you to cheat now, things will only be rougher for you later on. Be responsible and do your own homework.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Go away.
|
|
|
|
|
static void Main()
{
System.Console.Writeline("I am trying to cheat on my homework");
}
|
|
|
|
|
Yeah, Lulu - that should do the trick.
|
|
|
|