C# (pronounced C-Sharp) was developed by Microsoft in 2000 and is a "C-based" programming language and is an object-oriented .NET programming language. In other words, it is similar to C++ and Java, but it strongly-typed much like C++. However, it as not as strongly-typed as some of its language predecessors. A strongly-typed programming language regards data types in which it's required that constants must be defined within these predetermined data types. This also comes into play in using variables in, for example, data calculations where using an integer and a "double" (a type of decimal capable value) can conflict and cause errors. Beyond the scope of this short paragraph are ways to implement code to sometimes work around these conflicts. An example of a "loosely-typed" programming language, which is the opposite, is PHP. Again, like many things within programming, most developers have certain tastes and preferences other than respecting "good practice". This is great in the sense that, in my opinion, it keeps minds and development diverse with many perspectives.
As C# requires the .NET framework, it is not platform independent and does require the use of a Windows IDE such as Visual Studio. The good news for aspiring programmers and others interested in learning code but not to commit to expensive software, Microsoft offers Visual Studio Community Edition 2017 for free. Though it is still a powerful IDE and still has support for creating Android, iOS, Windows, Cloud applications and so forth; it can be assumed that it doesn't have all the "bells and whistles" that are seen in Visual Studio: Enterprise Edition (or Professional Edition).
For additional information, visit C# Corner, a social and support community for C# developers and programmers.
Note: Due to working a solution to convert the current C# programs, Windows Forms Applications, to ASP.NET and considering using a Connected System to show them, major code portions/examples are in .pdf format. Also listed in a downloadable zip file which includes the solution but not every detail, for security reasons.
- Averages Form: 'Form1.cs'
- "Guess A Word" (Link to Page)
- GuessAWord: 'GuessAWord.cs' (Web Form)
- "Prime Numbers" (Link to Page)
- PrimeFactors: 'PrimeForm.cs' (Web Form)
- Prime Factors.zip
Actual C# Files
Note: These files are in zip format and will need Visual Studio (Community Edition is free) in order to build/"play" the small program. Screenshots of the simple steps in Visual Studio are below.
- 1. After unzipping the files, open Visual Studio and click File > Open File from the menu.
- 2. Navigate to the unzipped folder and select the solution file (file extension .sln) and open
- 3. Once open, highlight the full solution as shown (opening the .sln file will pull dependent files automatically).
- 4. With the full Solution highlighted, click "Start" to build/compile the code and display the user interface.