From 9f151da50357e5d45088cca151ab0e2636f008de Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Wed, 13 Nov 2024 11:18:41 +0100 Subject: [PATCH] C# --- Emne 3/ConsoleApp1/ConsoleApp1.sln | 16 ++++++++++++++++ .../ConsoleApp1/ConsoleApp1.csproj | 10 ++++++++++ Emne 3/ConsoleApp1/ConsoleApp1/Program.cs | 15 +++++++++++++++ Emne 3/test/Program.cs | 5 ++++- Emne 3/test/bin/Debug/net6.0/test.dll | Bin 4608 -> 4608 bytes Emne 3/test/bin/Debug/net6.0/test.pdb | Bin 10264 -> 10264 bytes Emne 3/test/obj/Debug/net6.0/test.dll | Bin 4608 -> 4608 bytes Emne 3/test/obj/Debug/net6.0/test.pdb | Bin 10264 -> 10264 bytes 8 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Emne 3/ConsoleApp1/ConsoleApp1.sln create mode 100644 Emne 3/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj create mode 100644 Emne 3/ConsoleApp1/ConsoleApp1/Program.cs diff --git a/Emne 3/ConsoleApp1/ConsoleApp1.sln b/Emne 3/ConsoleApp1/ConsoleApp1.sln new file mode 100644 index 0000000..bd875a7 --- /dev/null +++ b/Emne 3/ConsoleApp1/ConsoleApp1.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{1571DA60-F5CA-48EA-A530-46769DF80DFF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1571DA60-F5CA-48EA-A530-46769DF80DFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1571DA60-F5CA-48EA-A530-46769DF80DFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1571DA60-F5CA-48EA-A530-46769DF80DFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1571DA60-F5CA-48EA-A530-46769DF80DFF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Emne 3/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj b/Emne 3/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..2f4fc77 --- /dev/null +++ b/Emne 3/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + + diff --git a/Emne 3/ConsoleApp1/ConsoleApp1/Program.cs b/Emne 3/ConsoleApp1/ConsoleApp1/Program.cs new file mode 100644 index 0000000..36022e5 --- /dev/null +++ b/Emne 3/ConsoleApp1/ConsoleApp1/Program.cs @@ -0,0 +1,15 @@ +namespace ConsoleApp1; + +internal class Program +{ + static void Main(string[] args) + { + Console.WriteLine("Hello, World!"); + var number = GetNumber(); + } + + static int GetNumber() + { + return 7; + } +} \ No newline at end of file diff --git a/Emne 3/test/Program.cs b/Emne 3/test/Program.cs index 1b23114..99480de 100644 --- a/Emne 3/test/Program.cs +++ b/Emne 3/test/Program.cs @@ -1,4 +1,7 @@ // See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!"); +Console.WriteLine("Press any key to exit..."); -Console.WriteLine("This is a basic console application."); + float f; + f = 0.0f; + \ No newline at end of file diff --git a/Emne 3/test/bin/Debug/net6.0/test.dll b/Emne 3/test/bin/Debug/net6.0/test.dll index 4ff9af6d5320d9a4e946f7b4f99a4a3ebc4195dd..8a5b3c38d8ba1532342b905384c0c07b2c884439 100644 GIT binary patch delta 331 zcmZorX;7Ka!P5P7!oi6>GK{w-t_){voy^Fn&bmdFfgxnFB9qSKNJe$W2a_8a>lt@W zW@HlPabRU&U}OMew#kf~29pDrG9&|l0?MJm3^^6&RtMrZpj_N!Mh;~G?a7U1qPGwG z&XsIB-}~$8&dDYmo<>kXSy`wc$Y?J8>iL0;c1lZ829kb1X0`D0o8n6QZC|p&x delta 333 zcmZorX;7Ka!Q$xcbZBCa4CAMXE5jM*PG)3OXFa3Jzz{N7kx6HAB%?axkI9XU^^6xM zGcpPDM6fb2FfxEK+vJBF29pDrG9)vA0?MJm3@t1S3<4mwd#I-ike;&nBGVn_XwMLa z42DdGVg>~$nFwShF(d*-G8vMA>|};~hCCoIpCN}K706FyC;-A7uxuhj36KWK>j6!i z(OdLN_XNM!j>cn&(hntsCVyZ%A*z@&{XGMtZvYceK^PD#r~&chv+UxmWk6QhkLwpJ(-*VNf&%XuCmOH=0Pg`@OaK4? diff --git a/Emne 3/test/bin/Debug/net6.0/test.pdb b/Emne 3/test/bin/Debug/net6.0/test.pdb index d204ce75601ed47706fbd7d719fbf92374adba70..b40636872b3cd5593ac6eaf989c182466361cbf5 100644 GIT binary patch delta 76 zcmV-S0JHy?P?%7Vd=x8_fi@M}!%dwTg3pcm)w#z3gXFQ0E&(83BXIwbgsY$9Vr?+3 ixNgmtF#AK!Q0{_J-(qT~tbCud-T|&90xklRjwgz&cqMoM delta 76 zcmV-S0JHy?P?%7Vd=xO1U5!+tXhWw*y00lY9_Arzm+!HVE&(736`uiT9?>t%TZ}}6 i^&-Lxd$Lhtrg?O=U?ZW>{!Klz-T|&90y+efjwg!T`5;~Z diff --git a/Emne 3/test/obj/Debug/net6.0/test.dll b/Emne 3/test/obj/Debug/net6.0/test.dll index 4ff9af6d5320d9a4e946f7b4f99a4a3ebc4195dd..8a5b3c38d8ba1532342b905384c0c07b2c884439 100644 GIT binary patch delta 331 zcmZorX;7Ka!P5P7!oi6>GK{w-t_){voy^Fn&bmdFfgxnFB9qSKNJe$W2a_8a>lt@W zW@HlPabRU&U}OMew#kf~29pDrG9&|l0?MJm3^^6&RtMrZpj_N!Mh;~G?a7U1qPGwG z&XsIB-}~$8&dDYmo<>kXSy`wc$Y?J8>iL0;c1lZ829kb1X0`D0o8n6QZC|p&x delta 333 zcmZorX;7Ka!Q$xcbZBCa4CAMXE5jM*PG)3OXFa3Jzz{N7kx6HAB%?axkI9XU^^6xM zGcpPDM6fb2FfxEK+vJBF29pDrG9)vA0?MJm3@t1S3<4mwd#I-ike;&nBGVn_XwMLa z42DdGVg>~$nFwShF(d*-G8vMA>|};~hCCoIpCN}K706FyC;-A7uxuhj36KWK>j6!i z(OdLN_XNM!j>cn&(hntsCVyZ%A*z@&{XGMtZvYceK^PD#r~&chv+UxmWk6QhkLwpJ(-*VNf&%XuCmOH=0Pg`@OaK4? diff --git a/Emne 3/test/obj/Debug/net6.0/test.pdb b/Emne 3/test/obj/Debug/net6.0/test.pdb index d204ce75601ed47706fbd7d719fbf92374adba70..b40636872b3cd5593ac6eaf989c182466361cbf5 100644 GIT binary patch delta 76 zcmV-S0JHy?P?%7Vd=x8_fi@M}!%dwTg3pcm)w#z3gXFQ0E&(83BXIwbgsY$9Vr?+3 ixNgmtF#AK!Q0{_J-(qT~tbCud-T|&90xklRjwgz&cqMoM delta 76 zcmV-S0JHy?P?%7Vd=xO1U5!+tXhWw*y00lY9_Arzm+!HVE&(736`uiT9?>t%TZ}}6 i^&-Lxd$Lhtrg?O=U?ZW>{!Klz-T|&90y+efjwg!T`5;~Z