C#: History, .NET, Pros/Cons
Published: 2023-10-09 00:57:08

##Why C#?

<p>Choosing a programming language when starting your career or satisfying an interest in programming can feel daunting at first glance given how many languages exist. Personally I started with JavaScript in my current bootcamp which has presented its challenges. However, I decided to look into other languages to see how the experiences could compare which led me to research Microsoft's C#. In this blog I will not be comparing the two languages, but rather exploring the history of C# along with its relationship with Microsoft's .NET platform and the advantages/disadvantages present in the programming language. I'd like to begin by providing the history of where C# was developed and why its originators brought the programming language into existence.</p> 

<p>- Side note: all programming languages have their pros and cons to varying degrees.</p>

---


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e6h5q2oackmromct5pc.png)

##C#'s History and Definition

<p>C#'s history begins in January 1999 as Anders Henjlsberg and his team began the project that would lead to the development of a new programming language labeled "Cool". However, the program language's name was short lived and replaced by Microsoft due to trademark reasons. By the time Microsoft's .NET project was publicly announced in July 2000, the newly renamed "C#" was still in development until its official launch in 2002. The origin of C#'s name is rather comical, due to my knowledge in music theory (unrelated), because of its reference to the # (sharp) accidental in modern music notation. When compared to C++, the # in C# is meant to reference four plusses on a two-by-two grid implying C# as C++'s successor or "increment" as Microsoft claims.</p>

<p> It's important to note that in the early days of Microsoft's new product (2002-2005), many similarities were correlated between Java and C# which led to a claim from Java's originators that C# was an "imitation" of their programming language. It was in 2005 that the developments and updates for both languages caused them to split off into their own unrelated trajectories that would later settle each language's respective definitions and functionality.</p>

<p> Fast-forward to today and we are able to observe the modern definition of what C# is in programming and the language's parameters and capabilities. For starters, C# is widely known as a general-purpose language or GPL for short allowing developers to utilize C# for programs such as:</p>

####1. Mobile/Desktop applications
####2. Web applications, services, and sites
####3. Games via the Unity Engine which is built with C#
####4. VR
####5. Database applications

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pn71bw8ybud09zlt1gzf.png)
- Source: Visual Studio

<p> Due to the human-like language (shown above) that allows abstraction from machine-language in C#, the language is classified as a high-level language. High-level coding languages allow programmers to read and write programs with more ease through the use of the language that we understand. Some features included in high-level programming languages include iteration/selection constructs(if/else/while), operators that help construct boolean responses(&&, !, ||, ===), and data structures such as arrays, lists, objects, trees, and several others.</p>

<p> Lastly, I'd like to point out that since C# is a language provided by Microsoft, C# is best used with Windows as a result. However, one important feature tied in with C# that gives the language more versatility is the existence of the .NET Framework. If you recall my mention of the .NET project in the first paragraph, it is safe to assume both .NET and C# are closely related. This is because C# was created to specifically work in tandem with the .NET Framework.</p>

<p> So what is this .NET?</p>

---


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtgia27htr2aesnac4pd.png)



##.NET Framework**

<p>Microsoft's .NET Framework (built in 2000) can be defined as their own software development framework that programmers can use to build and run applications on Windows. In the beginning of this frameworks' conception, this framework was pretty much limited to Windows operating systems. The .NET Framework was the predominant implementation of the Common Language Infrastructure otherwise known as "CLI" that describes executable code and a runtime environment that allows different computer platforms to utilized other high-level languages without having to refactor to fit specific architectures.</p>

<p>.NET Framework also includes the Framework Class Library(FCL) that provides language interoperability across multiple programming languages. This particular library provides a collection of classes, interfaces, and value types as well as the CLI Base Class Library. While this may seem like  a lot, this infrastructure provides no shortage of reusable data for programmers to implement.</p>

<p>Overtime, the .NET Framework was superseded by the cross-platform .NET project in 2016 which allows the platform to operate cross-platform on other operating systems such as iOS, Android, etc. With the modern cross-platform .NET framework (.NET 6), Windows operators have access to various compatible platforms for application building and running. As a result, Microsoft's .NET is becoming increasingly more accessible to other systems other than Windows and broadening the reach of C#.</p>

<p>This progress has been helpful in broadening C#'s outreach, but now that programmers have appropriate access to C# outside of Windows, let us explore the strengths and weaknesses of C#'s modern potential context.</p>

---


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qqxfvauh2rlj5urygrb8.png)



##Advantages and Disadvantages

<p>Alongside C#'s fast speed, rich library, and simple syntax, the advantages of using C# should begin with its relevance to programmers who use Windows versus iOS and Android. For Windows applications, enterprise solutions, and game development (with the Unity engine), C# holds the title as the most utilized programming language. C# is also object-oriented like other high-level languages, further separating the programmer from abstraction. In terms of compatibility and cross-platform capabilities, C# can be used to "interact with applications written in compatible languages"(4. dotnet.microsoft) such as its predecessor C++ and F#. This is thanks to C# place in the .NET platform, however, this has the potential to cross over to the disadvantage side of the fence.</p>

<p>Even though adjustments and updates have been implemented over the years to the .NET platform, C# is still heavily reliant on "Windows platforms for execution"(3. sololearn). This could mean trouble for iOS and Android programmers. C# also faces limited mobile development options due to the mobile development landscape still being dominated by iOS and Android. Also, while C# is a high-level language and easy to read, the extensive libraries have the potential to add unnecessary layers of complexity for beginners. Lastly, C#'s code is not interpreted at runtime, instead the code is compiled before runtime after every change is made making errors and bugs more likely to go unnoticed which is dangerous for new or inexperienced programmers. So extra caution when attempting to master C# is advised, not that all other programming languages are exempt from cautious approaches.</p>

---

##Conclusion

<p>In conclusion, C# has a range of reasons for programmers to pursue as long as they are aware of the potential shortcomings that the programming language inherits by default. Microsoft is still developing outside accessibility of C# for non-windows users and I believe that time will come. If you are still curious about C# and would like to look into studying it, feel free to browse the links listed below that helped me begin to understand C#. I hope you find them as helpful as I did.</p>

###Resources

1. https://www.altexsoft.com/blog/c-sharp-pros-and-cons/
2. https://www.sam-solutions.com/blog/dot-net-vs-c/
3. https://www.sololearn.com/blog/c-plus-plus-or-c-sharp/
4. https://dotnet.microsoft.com/en-us/learn/dotnet/what-is-dotnet-framework
5. https://code.visualstudio.com/docs/languages/csharp