❔ searching mistake
namespace App2
{
public class Program14
{
private static void SayHello()
{
Console.Write("What is ur name?"); string name = Console.ReadLine(); Console.WriteLine("Hello {0}", name); } static void Main(string[] args) { SayHello(); } } } CS1022 Type or namespace definition or end of file expected.
Console.Write("What is ur name?"); string name = Console.ReadLine(); Console.WriteLine("Hello {0}", name); } static void Main(string[] args) { SayHello(); } } } CS1022 Type or namespace definition or end of file expected.
2 Replies
C# Online Compiler | .NET Fiddle
Test your C# code online with .NET Fiddle code editor.
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.