Lister er fucked

This commit is contained in:
Geir Okkenhaug Jerstad 2024-11-25 13:34:54 +01:00
parent 03716695f9
commit 12c164c6b3
13 changed files with 157 additions and 26 deletions

View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,22 @@
namespace Constructors
{
public class Person
{
public String Name { get; set; }
public int Age { get; set; }
public Person(String name, Int32 age)
{
Name = name;
Age = age;
}
}
class Program
{
static void Main(string[] args)
{
var person1 = new Person("John", 19);
Console.WriteLine($"Navn: {person1.Name}, Alder: {person1.Age}");
}
}
}