Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Accessing Serial Port Remotely Pin
monstale16-Jul-09 2:36
monstale16-Jul-09 2:36 
GeneralRe: Accessing Serial Port Remotely Pin
Liya Kebede2-Nov-09 0:47
Liya Kebede2-Nov-09 0:47 
GeneralRe: Accessing Serial Port Remotely Pin
Member 1247082419-Apr-16 5:03
Member 1247082419-Apr-16 5:03 
Questioncall dll on client side Pin
Member 435374515-Jul-09 21:15
Member 435374515-Jul-09 21:15 
QuestionOwn Report Printer - How to print out Source Code (syntax highlighting) Pin
akamper15-Jul-09 21:09
akamper15-Jul-09 21:09 
Questionuse dataset with case statement Pin
Mamphekgo Bahula15-Jul-09 20:54
Mamphekgo Bahula15-Jul-09 20:54 
AnswerRe: use dataset with case statement Pin
Mycroft Holmes15-Jul-09 21:02
professionalMycroft Holmes15-Jul-09 21:02 
QuestionHow to use public int?!!?!!? windows form. Pin
dimo198215-Jul-09 20:39
dimo198215-Jul-09 20:39 
Hello All

I`m very new to the programming so this might be easy question to all of you, i`m hoping someone can help me out.

So i`m trying to write very easy program in windows form but i have encountered the problem.

lets say that i have an event on the button1 (CLICK) which should pick up a random number and hold it in the memory unless i click it again to change it. My problem is that i cannot figure out how to use this variable which has been set up in the first place with another event button2(Click) which will use this variable and do other task with using int previously declared. Short example:


public void Random_Click(object sender, EventArgs e)
{
Random myRandom = new Random();
int myNumber = myRandom.Next(1,10);
}
public void Button2_Click(object sender, EventArgs e)
{
MessageBox(myNumber.ToString());
}


This will not work and i cannot find the way to get it right

plese help !!!
AnswerRe: How to use public int?!!?!!? windows form. Pin
ichiganboya15-Jul-09 20:44
ichiganboya15-Jul-09 20:44 
GeneralRe: How to use public int?!!?!!? windows form. Pin
dimo198216-Jul-09 6:42
dimo198216-Jul-09 6:42 
GeneralRe: How to use public int?!!?!!? windows form. Pin
Huxley Stronghead16-Jul-09 10:07
Huxley Stronghead16-Jul-09 10:07 
AnswerRe: How to use public int?!!?!!? windows form. Pin
Mycroft Holmes15-Jul-09 21:06
professionalMycroft Holmes15-Jul-09 21:06 
AnswerRe: How to use public int?!!?!!? windows form. Pin
Luc Pattyn15-Jul-09 23:58
sitebuilderLuc Pattyn15-Jul-09 23:58 
Questionhow can i develop a program in aspx format and use it in php site?!! Pin
Nafiseh Salmani15-Jul-09 20:16
Nafiseh Salmani15-Jul-09 20:16 
AnswerRe: How could I generate a custom search with C# Pin
Mycroft Holmes15-Jul-09 21:07
professionalMycroft Holmes15-Jul-09 21:07 
GeneralRe: How could I generate a custom search with C# Pin
Nafiseh Salmani15-Jul-09 21:13
Nafiseh Salmani15-Jul-09 21:13 
QuestionC# 3D Button UserControl (How to increase performance) Pin
ichiganboya15-Jul-09 20:10
ichiganboya15-Jul-09 20:10 
AnswerRe: C# 3D Button UserControl (How to increase performance) Pin
ichiganboya15-Jul-09 23:17
ichiganboya15-Jul-09 23:17 
QuestionUsing F2 F3 In Web application Pin
kKamel15-Jul-09 20:04
kKamel15-Jul-09 20:04 
QuestionHow to add a button in the standard buttons list of IE window? Pin
svt gdwl15-Jul-09 19:09
svt gdwl15-Jul-09 19:09 
QuestionNeed help. Pin
mjawadkhatri15-Jul-09 19:07
mjawadkhatri15-Jul-09 19:07 
AnswerRe: Need help. Pin
Abhijit Jana15-Jul-09 19:31
professionalAbhijit Jana15-Jul-09 19:31 
GeneralRe: Need help. Pin
mjawadkhatri15-Jul-09 19:37
mjawadkhatri15-Jul-09 19:37 
GeneralRe: Need help. Pin
K030615-Jul-09 19:44
K030615-Jul-09 19:44 
GeneralRe: Need help. Pin
mjawadkhatri15-Jul-09 19:46
mjawadkhatri15-Jul-09 19:46 

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.