Introducing C# and .
NET
1. What is C#?
- general-purpose, type-safe, object-oriented programming language هي لغة
[Link] goal /الهدف
-of the language is programmer productivity اللغة هي
- simplicity,expressiveness, and performance بينC# يوازن ال
- The chief architect of the language since its first
- The C# language is works with a range of platform-specific Runtimes.
- implementation object-orientation paradigm C#ال
3. Object Orientation ?
- cludes encapsulation, inheritance, and polymorphism. بيOOP ال
4. What is encapsulation?
-(private) implementation details عن الexternal (public) behavior يفصل ال
5. Features of C# from an object-oriented perspective?
-The fundamental building block in C# is an encapsulated unit of data and func‐tions called a type.
- C# has a unified type system in which all types .
-All Type whether they represent business objects , or are primitive types such as numbers, share the
same basic functionality.
6. Properties, methods, and events?
7. Type Safety?
-C# is primarily a type-safe language,
instances of types can interact only through protocols they define, وهذا يعني أن
-More specifically, C# supports static typing,
- language enforces type safety at compile time.
-type safety being enforced at runtime.
-Static typing eliminates a large class of errors before a program is even run.
-Compiler of runtime unit tests لعبء بعيدًا يتحول
- compiler to verify that all the
types in a program fit together correctly.
-C# statically typed language.
- code to be dynamically typed , via the dynamic keyword بأن تكون يسمحC# ال
- strongly typed language يُطلق على لغة#C
- سميت بالقوه الن
because its type rules are strictly enforced (whether statically or at runtime)
8. Memory Management?
-runtime to perform automatic memory management. C# تعتمد لغة
-C# does not eliminate pointers: it merely makes them unnecessary for most pro
9. Platform Support?
[Link], BCLs, and Runtimes?
- Common Language Runtime and a Base Class Library. يتكونc#
- A runtime can also include a higher-level application layer that contains libraries for developing rich-
client, mobile, or web applications .
[Link] Language Runtime?
- automatic memory management and exception handling. يوفر
-C# is called source code
it compiles source code into managed code, which is represented in Intermediate Language (IL).
-The CLR converts the IL into the native code of the machine, This is referred to as Just-in-Time (JIT)
compilation.
-The container for managed code is called an assembly. An assembly contains not
only IL but also type information (metadata).
12. Base Class Library
- A CLR always ships with a set of assemblies called a Base Class Library (BCL).
- A BCL provides core functionality to programmers, such as collections, input/out‐
put, text processing, XML/JSON handling, networking, encryption, interop, con‐
currency, and parallel programming.
-A BCL also implements types that the C# language itself requires (for features such
as enumeration, querying, and asynchrony) and lets you explicitly access features of
the CLR, such as reflection and memory management.
13. Runtimes?
-A runtime (also called a framework) ,It can be downloaded and installed.
- A runtime consists of a CLR (with its BCL), plus an optional application layer specific to the kind of
application that you’re writing—web, mobile, client.
-When writing an application, you target a particular runtime, which means that
your application uses and depends on the functionality that the runtime provides.