C#, .NET, Visual Studio Overview
Telerik Academy Alpha
Table of contents
What && Why?
Why C#?
-
C# is one of the languages available in the .NET framework
-
Most widely used CLI language
-
-
C# is very similar to other object-oriented programming languages, but it has a unique set of features:
-
Built-in functional programming capabilities
-
Built-in asynchronous programming capabilities
-
Native garbage collection
-
Type safety
-
Why C#?
-
In short
-
Supported by Microsoft
-
Very popular
-
Not very steep learning curve
-
Type safe
-
Built in memory management
-
Why C#?
-
According to a developer's survey in Stack Overflow for 2017


What is .NET?

What .NET?
-
.NET is a free, cross-platform, open source developer platform for building many different types of applications.
-
With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, gaming, and IoT.

How it works?
Under the hood
How it works?
- Visual Studio 2017
- Create new project
- Console Application
- Create new project

How it works?
- Hit
- Ctrl+F5
- or Build => Build Solution
- What does a Console Application produce?
- Any ideas?
- ANSWER: .exe file


How it works?
- Where to find it
- It is in .bin folder of your project
- An .exe file with the name of the project
- But how does Visual Studio knows what to do?
- It is not magic
- It just runs a program (compiler) which builds the project and creates the .exe file for you
How it works?
- Just open the Developer Command Prompt for VS2017/15
- It is enhanced Command Prompt in Windows
- Navigate to the folder with your project
- type "csc Program.cs" (or the name of the file)
- And voila - you have a Program.exe file
- type Program.exe in the console


Libraries
Libraries
- Does anyone here knows how to calculate very big numbers in C#?
- That's right - BigInteger
- How we add this library?
- We add System.Numerics as a Reference

NuGet
- What actually is the library in C#
- It is just a .dll file
- Don't remember the extension for now
- It is just a program without a Main method
- It is just a .dll file
-
But how do we add more libraries?
- There is a package manager called NuGet
NuGet

Hints
Debugging!!!
- Please, please, please DEBUG your program
- There is no other way to find your bugs
- For now :)
- There is no other way to find your bugs


Questions?
[C#] Overview
By telerikacademy
[C#] Overview
- 1,323