C# Training Flashcards
what is C#
C# is a simple, modern, general-purpose, object-oriented programming language developed by Microsoft within its .NET initiative and approved by European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO).
what is C# based on?
C# is based on object oriented programming concepts.
what are the object oriented programming concepts (OOP)?
- Class
- Inheritance
- Object
- Abstraction
- Encapsulation
- Polymorphism
Describe a class
- -A class is a blueprint for any functional entity which defines its properties and its functions.
- -Here we can take Human Being as a class. Human Being, having body parts like hands, legs, eyes etc, which are its properties and performing various actions like walk, talk, eat, see etc, which are its functions.
Describe inheritance
- -Inheritance enables new objects to take on the properties of existing objects. A class that is used as the basis for inheritance is called a super-class or base class. A class that inherits from a super-class is called a subclass or derived class.
- -Considering Human Being a class, which has properties like hands, legs, eyes etc, and functions like walk, talk, eat, see etc. Male and Female are also classes, but most of the properties and functions are included in Human Being, hence they can inherit everything from class Human Being using the concept of Inheritance.
- -Therefore Male and Female are considered a subclass or derived class since they can inherit everything from the Human Being class. While the Human Being can be considered a super-class or base class because it is used as a basis of inheritance
Describe object
- -Objects are the physical representation of classes meanwhile classes are just a logical definition.
- My name is Ronald, and I am an instance/object of class Male. When we say, Human Being, Male or Female, we just mean a kind, you, your friend, me, we are the forms of these classes. We have a physical existence while a class is just a logical definition. We are the objects.
Describe Abstraction
- -Abstraction means, showcasing only the required things to the outside world while hiding the details.
- -Continuing our example, Human Being’s can talk, walk, hear, eat, but the details are hidden from the outside world. We can take our skin as the Abstraction factor in our case, hiding the inside mechanism.
Describe encapsulation
- Encapsulation means that we want to hide unnecessary details from the user.
- -For example, when we call from our mobile phone, we select the number and press call button. But the entire process of calling is hidden from us
What is polymorphism
Polymorphism is a concept, which allows us to redefine the way something works, by either changing how it is done or by changing the parts using which it is done. Both the ways have different terms for them called Overriding and Overloading respectively.
what is Overloading
This is a type of polymorphism which allows us to change the way something works by changing the parts used in getting things done.
–For example, If we walk using our hands, and not legs, here we will change the parts used to perform something (walking). Hence this is called Overloading.
What is Overriding
- -This is a type of polymorphism which allows us to change the way something works by changing how it is done.
- -For example, if there is a defined way of walking, but I wish to walk differently, but using my legs, like everyone else. Then I can walk like I want, this will be called as Overriding.
Why is C# a widely used programming language
It is a modern, general-purpose programming language
It is object oriented.
It is component oriented.
It is easy to learn.
It is a structured language.
It produces efficient programs.
It can be compiled on a variety of computer platforms. It is a part of .Net Framework.
what is the ,Net Framework
The .Net framework is a revolutionary platform that helps you to write applications. These .Net framework applications are multi-platform applications. The framework has been designed in such a way that it can be used from any of the following languages: C#, C++, Visual Basic, Jscript, COBOL, etc. All these languages can access the framework as well as communicate with each other.
Which applications can be written using the .Net Framework
Windows applications
Web applications
Web services
what are some of the components of the .Net Framewor
Common Language Run-time (CLR) The .Net Framework Class Library Common Language Specification Common Type System Metadata and Assemblies Windows Forms ASP.Net and ASP.Net AJAX ADO.Net Windows Workflow Foundation (WF) Windows Presentation Foundation Windows Communication Foundation (WCF) LINQ