This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
/* | |
using static System.Console; | |
allows access to properties and methods | |
of the static class Console without having | |
to include the name of the class | |
instead of: Console.ReadKey(); | |
we can use: ReadKey(); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Toastr | |
{ | |
class Item | |
{ | |
public string Name; | |
public double Calories; | |
public double Price; | |
public string[] Ingredients = {"", "", "" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PenguinSuperHero | |
{ | |
class Penguin | |
{ | |
string Name = "Anonymous Penguin"; | |
string Location = "Nowhere"; | |
bool Superhero = false; | |
double Points = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TryCatchExample | |
{ | |
class MyMath | |
{ | |
public int DivideBySelf(int _number) | |
{ | |
int _result = 0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Bumblebee.cs | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace DayTwoBumblebee | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Random Fortune | |
* by Your Name, Date | |
* | |
* This work is a derivative of | |
* "Random Fortune" by http://programmingisfun.com, used under CC BY. | |
* https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
using System; | |
using static System.Console; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* "C# Adventure Game" by http://programmingisfun.com, used under CC BY. | |
* https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
using System; | |
using System.Globalization; | |
namespace Adventure | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Example of a custom utility class (beginning C# programming) | |
* http://programmingisfun.com, used under CC BY. | |
* https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
using System; | |
using System.Globalization; | |
class Utility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* [Your Title] | |
* by Your Name, Date | |
* | |
* This work is a derivative of | |
* "C# Adventure Game" by http://programmingisfun.com, used under CC BY. | |
* https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* [Your Title] | |
* by Your Name, Date | |
* | |
* This work is a derivative of | |
* "C# Adventure Game" by http://programmingisfun.com, used under CC BY. | |
* https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
using System; |
NewerOlder