Code
- BankAcount.cs
- Transaction.cs
- Program.cs
- BasicTests.cs
if-throw
- if-throw
- The idea behind catching an exception is that when you pass data somewhere and process it, you might not always know if the result will be valid, that is when you want to catch.
- In this case, you don’t want to catch the exception. You’re throwing it to alert the caller that they’ve made a mistake in the way they called your method.
- Catching it yourself would prevent that from happening.
StringBuilder
- StringBuilder
- Represents a mutable string of characters.
- This class cannot be inherited.
- AppendLine
- Appends the default line terminator, or a copy of a specified string and the default line terminator, to the end of this instance.
nameof
- nameof
- A
nameof
expression produces the name of a variable, type, or member as the string constant
- A
Break Point
- Condition in Break Point
- When you use a Break Point, you can add conditions in the Break Point
- Right click, click the [Contidion]
Add Project
When you need them to reference, right click [Dependency]
- Add Library
- C# Class Library
- Add Test
- xUnit Test
Pakages
- Humanizer
- Humanizer.Core
- contains the library and the neutral language (English) resources.
Test
- [Fract]
- It belongs to the xUnit unit testing framework.
- It says that the method is a unit test.
- Assert
- A collection of helper classes to test various conditions within unit tests.
- If the condition being tested is not met, an exception is thrown.
- Throw
- A collection of helper classes to test various conditions within unit tests.
- If the condition being tested is not met, an exception is thrown.
Publish
- Publish
- From .Net Core, you can publish Window, IOS, Linux versions.