Jump to content
  • Advertisement
Sign in to follow this  
en972

Running Programs in Sharp Develop

This topic is 4886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I wrote a program (basic function program) in C# in my sharp develop IDE. I clicked the build tab and than build combine (I guess thats the same as compile) I got no errors. I clicked the debug tab than run. The program didn't run. Now Iwas freaking out. After a few minutes I found a little tab near the output tab that said Console. I clicked it. And there was my program in this small light brown window. The program was supposed to say Your mom goes to college. What it said was Yourdevelop/do mom goes to collegec Than I saw this very little button and than my code said C:/WINDOWS/Microsoft.net/Framework> Your mom goes to college Is this the only way I can run my command line code? Is there a way to fix all this? Thanks! Cheers!

Share this post


Link to post
Share on other sites
Advertisement
using System;
class Hello
{
static void Main()
{
DisplayYour(); Displaymom(); Displaygoes();
Displayto(); Displaycollege();
}

static void DisplayYour()
{
Console.WriteLine("Your");
}


static void Displaymom()
{
Console.WriteLine("mom");
}

static void Displaygoes()
{
Console.WriteLine("goes");
}

static void Displayto()
{
Console.WriteLine("to");
}

static void Displaycollege()
{
Console.WriteLine("college');
}
}

Share this post


Link to post
Share on other sites
Quote:
Console.WriteLine("college');
umm, don't know c# but, in every other language i use, and judging by the previous functions, shouldn't the closing quotes also be " not '?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yeah, I meant to type that. My actual code had " but I didnt copy and paste it.
Anyways does anyone know whats going on

Share this post


Link to post
Share on other sites
Instead of Console.WriteLine("Your");, try Console.Write("Your ");.

Console.WriteLine is just going to write on a new line each time.

[EDIT]: two semicolons...

Share this post


Link to post
Share on other sites
Ok thanks.

only one more question

1. So when I click run to view my programs I have to click the little console button unless its a windows program?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!