[RESOLVED] Help with increasing int!
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: [RESOLVED] Help with increasing int!

Threaded View

  1. #1
    Join Date
    Jan 2011
    Posts
    2

    [RESOLVED] Help with increasing int!

    case "north":
    Console.WriteLine("Moved North");
    int xCord;
    xCord++;
    int yCord = new int();
    yCord = 0;
    Console.WriteLine("(" + xCord + "," + yCord + ")");
    break;

    --

    Hey, I'm new to C-sharp and am having trouble with int's.

    I want to increase the xCord by value of 1, every time 'north' is entered and the loop run again.
    But with this current code, it stays at 1 no matter how many times the loop runs.

    Thanks in advance
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center