Hey Im very new to C# so in my Programming course the teacher creats a new class. This wasnt working in my Version of VS Code so i createt a new File and Named it Human.cs But in the Main-Methode it cant resolve the class. Heres my Code:
using System;
namespace Udemy_21
{
class Program
{
static void Main(string[] args)
{
// Create Obejekt Human Class
Human human = new Human();
Console.WriteLine("Hello World!");
}
}
}
The second code:
using System;
using System.Collections.Generic;
using System.Text;
namespace Udemy_21
{
// Blaupause für Datentyp
class Human
{
// Membervariable: Vorname
public string firstname;
// Member Methode
public void IntroduceMyself()
{
System.Console.WriteLine("Hi ich bin, {0}", firstname);
}
}
}
An heres a picture of VS code: