Lister er fucked
This commit is contained in:
parent
03716695f9
commit
12c164c6b3
13 changed files with 157 additions and 26 deletions
16
Emne 3/Constructors/Constructors.sln
Normal file
16
Emne 3/Constructors/Constructors.sln
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Constructors", "Constructors\Constructors.csproj", "{E8126D7B-F007-4E3D-8A8C-473B25A5CFE6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E8126D7B-F007-4E3D-8A8C-473B25A5CFE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E8126D7B-F007-4E3D-8A8C-473B25A5CFE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E8126D7B-F007-4E3D-8A8C-473B25A5CFE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E8126D7B-F007-4E3D-8A8C-473B25A5CFE6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
10
Emne 3/Constructors/Constructors/Constructors.csproj
Normal file
10
Emne 3/Constructors/Constructors/Constructors.csproj
Normal 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>
|
22
Emne 3/Constructors/Constructors/Program.cs
Normal file
22
Emne 3/Constructors/Constructors/Program.cs
Normal 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}");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue