-
Notifications
You must be signed in to change notification settings - Fork 1
/
Csharp_Notes.txt
65 lines (35 loc) · 1.53 KB
/
Csharp_Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Compiling the code:
The csc.exe executable file usually is located in the Microsoft.NET\Framework\<Version> folder under the Windows directory. Its location might vary depending on the exact configuration of a particular computer. If more than one version of the .NET Framework is installed on your computer, you'll find multiple versions of this file. For more information about such installations, see How to: determine which versions of the .NET Framework are installed.
To compile:
Csc hello_World.cpp
Default compiled binary file name is (fileName.exe)
Commenting:
// for single line comments
/* for multi line comments */
/// XML tags displayed in a code comment
To run the file:
mono program_name.exe
OR
mcs hello.cs
Re-naming compiled files:
csc hello_World.cs -o hello.cs
Data Types:
bool Boolean value True or False
byte 8-bit unsigned integer
char 16-bit Unicode character
decimal 128-bit precise decimal values with 28-29 significant digits
double 64-bit double-precision floating point type
float 32-bit single-precision floating point type
int 32-bit signed integer type
long 64-bit signed integer type
sbyte 8-bit signed integer type
short 16-bit signed integer type
uint 32-bit unsigned integer type
ulong 64-bit unsigned integer type
ushort 16-bit unsigned integer type
object obj;
obj = 100; // this is boxing
String str = "Tutorials Point";
Outputting to the terminal:
Debugging:
creating a debugging file using -ggdb flag, similar to creating the .exe but this will do both. (VS Code)