TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
John Burns
NA
120
109.2k
why wont C#do this simple action?
Dec 13 2010 2:21 PM
i setup a simple loop and wanted a window to appear showing the results of the loop .. it fails, but works perfeclty fine in VB!
private void button1_Click(object sender, EventArgs e)
{
int count = 10;
while (count > 5)
{
count = count - 1;
MessageBox.Show(count);
}
made small amendment. says it cant convert from int to string
however it will work with string, like this:
private void button1_Click(object sender, EventArgs e)
{
string count = "john";
{
MessageBox.Show(count);
}
so somethings telling me VB has one over C# on that simple action. so i gota figure a way out of formatting that integer value to a string i guess in order to show it in the textbox but even the ToString method fails to work .. hmmmmm
Reply
Answers (
12
)
The name 'InitVariables' does not exist in the current context
creating a line at runtime, then using an array to create multiples?