HighTechTalks DotNet Forums  

Displaying a value stored in a variable

Dotnet VJSharp microsoft.public.dotnet.vjsharp


Discuss Displaying a value stored in a variable in the Dotnet VJSharp forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
ByTe
 
Posts: n/a

Default Displaying a value stored in a variable - 03-06-2006 , 04:35 PM







Hi
I am just starting to learn how to use microsoft visual j#,
and I wonder if anyone could help me with this problem, I am
trying to display a number stored in a varible into a message
Box.show but I keep getting the Error below:

Error 1 Cannot find method 'Show(int)' in
'System.Windows.Forms.MessageBox' C:\Documents and Settings\Keith\Local
Settings\Application Data\Temporary
Projects\WindowsApplication1\Form1.jsl 84 3 WindowsApplication1


The code I am writing is:


private void button1_Click(Object sender, System.EventArgs e)
{
int x = 6;
x = 6;
MessageBox.Show(x);

}
}



Could someone please help me with this?


Thanks


Keith



--
ByTe
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------


Reply With Quote
  #2  
Old   
Homer J Simpson
 
Posts: n/a

Default Re: Displaying a value stored in a variable - 03-07-2006 , 11:15 PM







"ByTe" <ByTe.249y9w (AT) mail (DOT) codecomments.com> wrote


Quote:
MessageBox.Show(x);
I'd expect

int x;
x = 6;
MessageBox.Show(String.Concat("X=", System.Convert.ToString(x)));

but I could be wrong.





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.