1 00:00:00,190 --> 00:00:04,250 We've been running our C# programs with the command dotnet run. 2 00:00:04,250 --> 00:00:06,230 So what is this dotnet exactly? 3 00:00:07,465 --> 00:00:12,220 .NET is a framework developed by Microsoft with the intent to improve on earlier work 4 00:00:12,220 --> 00:00:17,050 by Sun Microsystems with Java and its virtual machine. 5 00:00:17,050 --> 00:00:22,251 .NET is a platform that can run programs written in various languages including C#, 6 00:00:22,251 --> 00:00:24,495 F#, and Visual Basic. 7 00:00:24,495 --> 00:00:28,070 C# is primarily an object-oriented programming language and 8 00:00:28,070 --> 00:00:31,785 it's the most popular language on the.net platform. 9 00:00:31,785 --> 00:00:35,020 F# is primarily a functional language. 10 00:00:35,020 --> 00:00:39,720 And Visual Basic is a more simplistic language intended for beginning coders. 11 00:00:39,720 --> 00:00:43,930 Which is not to say Visual Basic is a more appropriate choice for learning to code. 12 00:00:43,930 --> 00:00:47,248 You can definitely learn C# as your first programming language. 13 00:00:47,248 --> 00:00:50,220 And since C# is much more popular, 14 00:00:50,220 --> 00:00:54,112 there's really no reason to bother with Visual Basic if you don't want to. 15 00:00:54,112 --> 00:00:59,750 C#, F#, and Visual Basic all compiled down to an intermediate language 16 00:00:59,750 --> 00:01:04,950 which is handled by the .NET common language runtime or CLR. 17 00:01:04,950 --> 00:01:09,010 This intermediate language isn't intended to be written or read by humans and 18 00:01:09,010 --> 00:01:12,510 it can't be executed directly on a computer processor either. 19 00:01:12,510 --> 00:01:16,780 The CLR is responsible for compiling the intermediate language into machine 20 00:01:16,780 --> 00:01:19,750 language which a computer processor can run. 21 00:01:19,750 --> 00:01:22,662 This used to mean that your users would have to download and 22 00:01:22,662 --> 00:01:26,520 install dotnet in order to run your finished program. 23 00:01:26,520 --> 00:01:29,890 But now it's possible to create a self contained deployment and 24 00:01:29,890 --> 00:01:32,840 executable that contains the .NET runtime so 25 00:01:32,840 --> 00:01:37,100 it can run all by itself without .net installed on the target system. 26 00:01:38,355 --> 00:01:41,854 Because self contained 10 deployments include the .net runtime, 27 00:01:41,854 --> 00:01:43,655 they're a bit larger in size. 28 00:01:43,655 --> 00:01:47,645 So it's also still possible to create a framework dependent deployment. 29 00:01:47,645 --> 00:01:51,835 These require your users to install the .NET runtime separately, but 30 00:01:51,835 --> 00:01:53,125 they're also a bit smaller. 31 00:01:54,445 --> 00:01:56,575 So why go to all this trouble? 32 00:01:56,575 --> 00:01:59,905 The promise of .NET is the ability to write code once and 33 00:01:59,905 --> 00:02:02,665 have it run on any compatible operating system. 34 00:02:03,700 --> 00:02:08,500 .NET compatible implementations are available for Windows, MacOS, Linux, 35 00:02:08,500 --> 00:02:10,370 and even iOS and Android. 36 00:02:10,370 --> 00:02:14,360 It's not quite as simple as being able to write a single program and have it run on 37 00:02:14,360 --> 00:02:19,250 all these platforms, but you'll definitely be able to reuse portions of your code. 38 00:02:19,250 --> 00:02:21,225 Hopefully this clears up some confusion. 39 00:02:21,225 --> 00:02:23,590 .NET is not the same as C# and 40 00:02:23,590 --> 00:02:27,565 it is not an alternative to C# because it isn't a programming language. 41 00:02:27,565 --> 00:02:32,860 It's the framework that is used to run code written in C# and other languages.