Study Note:C# in a Nutshell-Chapter 1 Introducing C# and the .NET Framework

This chapter is a general describe to the C# language and .NET Framework. C# is designed by Anders, a gene programmer, who created the Turbo Pascal and Delphi, helped Borland compete with Microsoft for many years. Now he joined MS, created the C#. Another side, Borland sold out its IDE department CodeGear. Oops.

1.1 Object Orientation
C# is an Object Orientation Program Language. The three characters of OO are, encapsulation/inheritance/polymorphism.
Unified Type System: All the type have a same base type. Is it the type "Object"?
Classes and Interfaces: Type is a class in OO. Class doesn't support multiple inheritance in C#, use Interface. Like Java. Interface just a definition of a type, can't have any implement code.
Properties/methods/events: These are all function.
1.2 Type safety
Type safety, strongly type language, what are the differences? Or they have the relationship?
I know the strongly type, it trade the type strictly. It can't accept a different type A to a type B if the type A can't downcast to type B.
Type safety, I don't understand it. Need further learning.
1.3 Memory Management
CLR use garbage collector, so you don't need to delete the dynamic created objects. C# don't advise you to use pointer, but it support. You can use pointer in the "unsafe" block.
1.4 Platform Support
C# is running on CLR, like the java mechanism, so it can support multiple OS I think, but .NET doesn't have a implement on other OS. So C# is a windows based language now. But we can write cross-platform code with on these scenarios: ASP.NET, with other language which supported by .NET, Silverlight.
1.5 C#'s Relationship with the CLR
CLR like a host. Their type system is very similar.
1.6 The CLR and .NET Framework
The picture showed beside is very important to understand the whole structure.
CLR execute the managed code. IL is a represent of managed code.

 

 
1.7 What's new in C# 3.0
LINQ is the center of the new features.
LINQ: Language Integrated Query. Very similar with the SQL query in the form. The different is, LINQ use this organization:"from … where… select"
And there are several features to improve the LINQ. In this section, have a overview, I will learn them in follow chapters.
發佈了35 篇原創文章 · 獲贊 5 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章