Introduction Flashcards

1
Q

What are the two main components of the .NET framework?

A

Class Library and
Common Language Runtime (CLR)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the Common Language Runtime (CLR)?

A

The CLR is a virtual machine (software that manages the execution of programs and hides from them the underlying operating system and hardware).

It is responsible for managing the execution of .NET programs regardless of any .NET programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Framework Class Library (FCL)?

A

It is the collection of reusable, object-oriented class libraries, also called the Assemblies.

It is just like the header files in C/C++ and packages in Java.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What were the three types of applications?

A

WinForms: Windows Form-based applications.

ASP.NET: Web-based applications come under this category.

ADO.NET: It includes the application which are developed to communicate with the database like MS SQL Server, Oracle etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is WPF?

A

Windows Presentation Foundation (WPF) is a graphical subsystem given by Microsoft which uses DirectX and is used in Windows-based applications for rendering UI (User Interface).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is WCF?

A

Windows Communication Foundation (WCF) is used to communicate with cross-platform applications and to
develop network distributed applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is LINQ?

A

Language Integrated Query (LINQ) is a query language used to query the data sources with different .NET programming languages.

LINQ enables us to query any type of data source (databases, files, collections etc.).

Another benefit of using LINQ is that it provides IntelliSense and compile-time error checking.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Common Type System (CTS)?

A

Common Type System (CTS) describes a set of types that can be used in different .NET languages in common.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the garbage collection(GC)?

A

CLR also contains the Garbage Collector (GC), which runs in a low-priority thread and checks for un-referenced, dynamically allocated memory space.

If it finds some data that is no longer referenced by any
variable/reference, it re-claims it and returns it to the OS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is C# so popular and in demand?

A
  1. Easy to Start
  2. Widely used for developing Desktop and Web Application
  3. Community
  4. Game Development
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some characteristics of .NET Core?

A
  • Cross platform: can run on different operating systems.
  • Consistent Across Architectures: Runs your code with the same behavior on multiple architectures.
  • Command-line Tools: Includes easy-to-use command-line tools that can be used for local development.
  • Flexible Deployment: Can be included in your app or installed side-by-side user- or machine-wide
  • Compatible: .NET Core is compatible with .NET Framework, Xamarin and Mono, via .NET Standard.
  • Open-Source: The .NET Core platform is open source, using MIT and Apache licenses. .Net Core is .NET Foundation project.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Visual Studio IDE?

A

Visual Studio IDE (Integrated Development Environment) is the
Development Environment for all .NET based applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an Identifier?

A

An identifier is a name used to identify a class, variable, method, or any other user-defined item.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are keywords?

A

Keywords are reserved words predefined to the C# compiler.

get and set are contextual keywords.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Type Inference?

A

Used through the var keyword, the compiler “infers” what the type of the variable is by what the variable is initialized to.

example.
var number = 10;

number is recognized as an int.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a Verbatim String Literal?

A

Used through the @ symbol, the @ symbol tells the string constructor to ignore escape characters and line breaks.

17
Q

What is string interpolation

A

The insertion of values of variables into a string with simple syntax.

18
Q

What is a class?

A

A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and properties.

When you define a class, you define a blueprint for a data type.

19
Q

What is an instance?

A

A particular object of a class.

20
Q

How are classes and structs different?

A

Structs differ from classes because they do not need to be allocated on the heap.

Classes are reference types and are always allocated on the heap.

Structs are value types and are usually stored on the stack.

21
Q

What keyword do you use to declare an instance?

A

new

22
Q

What is the idea of a property?

A

The idea of a property is that it is a redesigned getter and setter function.

23
Q

What is the purpose of a property?

A

The purpose of a property is to get and/or set the field.

24
Q

Structs are what type?

A

Value.

This means they are stored in the stack and have the same lifetime restrictions as the simple data types.

25
Q

Do classes and structs support inheritance?

A

Classes support inheritance, structs do not.

26
Q

What is inheritance?

A

Inheritance is a form of software reuse in which a new class is created by absorbing an existing class’s members and enhancing them with new or modified capabilities.

27
Q

The existing class from which a new class inherits members is called

A

base class or parent class.

28
Q

What is single inheritance?

A

With single inheritance, one class can derive from one base class. This is a possible scenario with C#.

29
Q

What is multiple inheritance?

A

Multiple inheritance allows deriving from multiple base classes. C# does not support multiple inheritance with classes, but it allows multiple inheritance with interfaces.

30
Q

What is multilevel inheritance?

A

Multilevel inheritance allows inheritance across a bigger hierarchy. Class B derives from class A, and class C derives from class B. This is supported and often used with C#.

31
Q

What is interface inheritance?

A

Interface inheritance defines inheritance with interfaces. Here, multiple inheritance is possible.

32
Q

Describe a class’s public members

A

A class’s public members are accessible wherever the app has a reference to an object of that class.

33
Q

Describe a class’s private members

A

A class’s private members are accessible only within the class itself.

A base class’s private members are inherited by its derived classes but are not directly accessible by derived-class methods and properties.

34
Q

Using protected does what?

A

Using protected access offers an intermediate level of access
between public and private.

35
Q

What is polymorphism?

A

Polymorphism enables you to write apps that process objects that share the same base class in a class hierarchy as if they were all objects of the base class.

36
Q

What is static polymorphism?

A

In static polymorphism, the decision is made at compile-time.

37
Q

An example of static polymorphism is method overloading, what is it?

A

Method overloading is a concept where a class can have more than one method with the same name and different parameters.

38
Q

What is dynamic polymorphism?

A

In dynamic polymorphism, the decision is made at run-time.

Run-time polymorphism is achieved by method overriding.

39
Q

What are abstract classes?

A

These classes cannot be used to instantiate objects, because abstract classes are incomplete.

The purpose of an abstract class is primarily to provide an appropriate base class from which other classes can inherit, and thus share a common design.