問題一覧
1
C# is pronounced as “____".
see-sharp
2
It is an object-oriented programming language created by Microsoft that runs on the .NET Framework.
c#
3
C# has its roots in the C family of languages and will be immediately familiar to
c, c++, java, javascript
4
The first version was released in year
2002
5
The latest version, ___, was released in September 2019.
c#8
6
The latest version, C# 8, was released in ___.
september 2019
7
C# is used for
vr, mobile applications, desktop applications, web applications, web services, web sites, games, database applications
8
is a programming language
c#
9
___ is a framework for building applications on Windows
.NET
10
.Net is a CLR. what is clr?
common language runtime
11
can be used to explain C# code, and to make it more readable. It can also be used to prevent execution when testing alternative code.
comments
12
There are two types of comments:
single-line comments, multi-line comments
13
__ Comments start with two forward slashes (//)
single-line
14
__ Comments start with /* and ends with */.start with /* and ends with */.
multi-line
15
___ containers for storing data values
variables
16
Different types of variables:
int, double, char, string, bool
17
– stores integers (whole numbers) – without decimals, such as 123 or -123
int
18
– stores floating point numbers – with decimals, such as 20.99 or -20.99
double
19
– stores single characters – such as 'a' or ‘B’
char
20
– stores text, such as "Hello World".
string
21
– stores values with two states – such as true or false
bool, boolean
22
To create a variable, you must specify the type and assign it a value:
type variableName = value;
23
To declare more than one variable of the same type, use a ___:
comma-separated list
24
However, you can add the ____ keyword if you don't want others (or yourself) to overwrite existing values.
const
25
The ___ method is often used to display variable values to the console window.
WriteLine()
26
Combine a text and a variable with the + sign
concatenation
27
___ can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
identifiers
28
There are two types of Casting:
implicit casting, explicit casting
29
converting a smaller type to a larger type size
implicit casting
30
converting a larger type to a smaller size type
explicit casting
31
converting a smaller type to a larger type size (also called as widening) • char -> int -> long -> float -> double
implicit casting
32
converting a larger type to a smaller size type (also called as narrowing) • double -> float -> long -> int -> char
explicit casting
33
specifies the size and type of variable values
data type
34
Types of data types
int, long, float, double, bool, char, string, byte, sbyte, short, uint, ulong, ushort, decimal
35
is done automatically when passing a smaller size type to a larger size type:
implicit casting
36
must be done manually by placing the type in parentheses in front of the value:
explicit casting
37
are used to perform operations on variables and values.
operators
38
Are used to perform common mathematical operations:
arithmetic operators
39
• are used to assign values to variables
assignment operators
40
are used to compare two values
relational operators
41
are used to determine the logic between variables or values:
logical operators
42
___ is used to output (print) values.
Console.WriteLine()
43
___ is used to get the user input
Console.ReadLine()
44
___ is a block of code which only runs when it is called.
method
45
Methods are used to perform certain actions, and they are also known as ___
functions
46
A method is defined with the name of the method, followed by ___
parentheses
47
The ___ keyword, used in the examples above, indicates that the method should not return a value.
void
48
To return a value, you can use primitive data types ( such as int or double) instead of void, and use the ___ keyword inside the method.
return
49
It is also possible to send arguments with the ___ syntax.
key:value
50
You commonly see the ___ keyword because it appears on different programming languages:
public
51
The ___ keyword is an access modifier, which is used to set the access level/visibility for classes, fields, methods and properties.
public
52
accessible for all classes
public
53
only accessible within the same class
private
54
is accessible within the same class, or in a class that is inherited from that class
protected
55
The C# ___ class has many methods that allows you to perform mathematical tasks on numbers.
math
56
This method can be used to find the highest value of x and y
Math.Max()
57
This method returns the square root of x
Math.Sqrt()
58
This method returns the absolute (positive) value of x.
Math.Abs()
59
This method rounds a number to the nearest whole number.
Math.Round()
60
This method can be used to find the smallest value of x and y.
Math.Min()
61
This method raises a number to a specified number.
Math.Pow()
62
__ are used for storing text.
string
63
• A ___ variable contains a collection of characters surrounded by double quotes.
string
64
This method can be used to find the length of a string.
string length
65
This method will return a copy of string converted to uppercase.
string ToUpper
66
This method will return a copy of string converted to lowercase.
string ToLower
67
The ___ operator can be used between strings to combine them. This is called concatenation.
+
68
The + operator can be used between strings to combine them. This is called ___.
concatenation
69
Another option of string concatenation, is string __, which substitutes values of variables into placeholders in a string.
interpolation
70
Also note that you have to use the ___ when using the string interpolation method.
dollar sign
71
The ___ escape character turns special characters into string characters:
backslash