Running Programs in Sharp Develop
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!
That shouldn't be happening with #develop. Post your code so I can see if you have any problems in that regard.
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');
}
}
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');
}
}
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 '?
Yeah, I meant to type that. My actual code had " but I didnt copy and paste it.
Anyways does anyone know whats going on
Anyways does anyone know whats going on
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...
Console.WriteLine is just going to write on a new line each time.
[EDIT]: two semicolons...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement