C
C#17mo ago
hustarico

❔ my screen is different than the tutorial

so I wanted to start learningc# to make games,but when i got to making the template of the console code I hade a different screen than the one in the tutorial ,he had a dozen lines laready typed using the template while I had only one,does make any difference and does it mean I can't keep following him because of release difference of something?pls help me I really don't understand (the blue screen is mine,the dark one is the tutorial)
7 Replies
SinFluxx
SinFluxx17mo ago
Top-level statements - C# tutorial
This tutorial shows how you can use top-level statements to experiment and prove concepts while exploring your ideas
SinFluxx
SinFluxx17mo ago
The whole article may be a bit much (?) but essentially it is the same code, just that what's showing on your machine has the "top level statements" removed to reduce clutter, but also can be confusing when you're starting out, as you've discovered! You should be able to just manually add them back in yourself
hustarico
hustaricoOP17mo ago
and if don't add them it's ok?
ero
ero17mo ago
please try to read the links you're provided (starting with the one that literally came with the template you have right there in the screenshot) but yes, you're fine without adding them
hustarico
hustaricoOP17mo ago
ok,thank you so much for your help
Angius
Angius17mo ago
namespace MyApp
{
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
}
namespace MyApp
{
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
}
Is the same as
namespace MyApp;

public class Program
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
namespace MyApp;

public class Program
{
public static void Main()
{
Console.WriteLine("Hello World!");
}
}
And the same as
Console.WriteLine("Hello World!");
Console.WriteLine("Hello World!");
For the most part, at least
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server