avnc 033
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
tst/
|
||||
obj/
|
||||
bin/
|
||||
.vscode/
|
||||
*.sln
|
||||
|
@ -1,4 +1,6 @@
|
||||
string[] students = new string[] {"Sophia", "Nicolas", "Zahirah", "Jeong"};
|
||||
string[] students = new string[] {
|
||||
"Sophia", "Nicolas", "Zahirah", "Jeong"
|
||||
};
|
||||
|
||||
int studentCount = students.Length;
|
||||
|
||||
|
1069
033_Debug_console_apps_2/033_csharp.md
Normal file
28
033_Debug_console_apps_2/ejm_debug/Program.cs
Normal file
@ -0,0 +1,28 @@
|
||||
// This code uses a names array and corresponding methods to display
|
||||
// greeting messages
|
||||
|
||||
string[] names = { "Sophia", "Andrew", "AllGreetings" };
|
||||
string msg_txt = "";
|
||||
|
||||
for (int i = 0; i < names.Length; i++){
|
||||
string name = names[i];
|
||||
if (name == "Sophia")
|
||||
msg_txt = sophia_msg();
|
||||
else if (name == "Andrew")
|
||||
msg_txt = andrew_msg();
|
||||
else if (name == "AllGreetings")
|
||||
msg_txt = sophia_msg();
|
||||
msg_txt = msg_txt + "\n\r" + andrew_msg();
|
||||
Console.WriteLine(msg_txt + "\n\r");
|
||||
}
|
||||
|
||||
bool pauseCode = true;
|
||||
while (pauseCode == true);
|
||||
|
||||
static string sophia_msg() {
|
||||
return "Hello, my name is Sophia.";
|
||||
}
|
||||
|
||||
static string andrew_msg() {
|
||||
return "Hi, my name is Andrew. Good to meet you.";
|
||||
}
|
10
033_Debug_console_apps_2/ejm_debug/ejm_debug.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
BIN
033_Debug_console_apps_2/img/code_oss_debug_01.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_02.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_03.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_04.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_05.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_06.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_07.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_08.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_panel.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debug_toolbar.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
033_Debug_console_apps_2/img/code_oss_debuger.png
Normal file
After Width: | Height: | Size: 102 KiB |
@ -36,4 +36,5 @@ Following
|
||||
29. [Methods that return values](./029_return_value_method/029_csharp.md)
|
||||
30. [Guided project - Plan a Petting Zoo](./030_project_petting_zoo/030_csharp.md)
|
||||
31. [Challenge project - Create a mini-game](./031_Challenge_mini_game/031_csharp.md)
|
||||
32. [Debug console applications](./032_Debug_console_apps/032_csharp.md)
|
||||
32. [Debug console applications 1](./032_Debug_console_apps/032_csharp.md)
|
||||
32. [Debug console applications 2](./032_Debug_console_apps_2/033_csharp.md)
|
||||
|