Tag: c#
-

C# Track, Exercism #46 Parsing Log Files
Relevant link Github solution: exercism-solutions/parsing-log-files Exercism #46: Parsing Log Files Learning Goal Regular Expressions Relevant Information Processing of regular expressions are handled using the Regex class Task 1: Identify garbled log lines To determine if the logs contains one of these at the beginning: [TRC][DBG][INF][WRN][ERR][FTL] I used the IsMatch() method Task 2: Split the log line To…
-

C# Track, Exercism #45 High School Sweethearts
Relevant link Github solution: exercism-solutions/high-school-sweethearts Exercism #45: High School Sweethearts Learning Goal String Formatting | Verbatim Strings Relevant Information String formatting in C# is just filling in blanks in a text template. Instead of gluing strings together with + signs, C# gives you two clean ways to insert variables into text: 1. The Classic Way: string.Format() (Composite…
-

C# Track, Exercism #44 Beauty Salon Goes Global
Relevant link Github solution: exercism-solutions/beauty-salon-goes-global Exercism #43: Beauty Salon Goes Global Learning Goal Time | Timezone Relevant Information In .NET, the concept of time is primarily represented by the DateTime struct. It provides functionality for working with dates and times, including converting between local time and UTC. Time-based calculations and arithmetic can be performed using the TimeSpan…
-

C# Track, Exercism #43 Phone Number Analysis
Relevant link Github solution: exercism-solutions/phone-number-analysis Exercism #43: Phone Number Analysis Learning Goal Tuples Relevant Information Tuples in C# is a way of organizing data to hold 2 or more fields of any type. Each field is separated by commas within parentheses. Task 1 Your analysis should return 3 pieces of data Implement the (static) method PhoneNumber.Analyze() to…
-

C# Track, Exercism #42 Red vs. Blue: Darwin Style
Relevant link Github solution: exercism-solutions/red-vs-blue-darwin-style Exercism #42: C# exercises on Exercism Learning Goal Namespaces Relevant Information Namespaces are a way to group related code and to avoid name clashes and are generally present in all but the most trivial code base. Types enclosed in namespaces are referred to outside the scope of the namespace by prefixing the type…
-

C# Track, Exercism #41 Authentication System
Relevant link Github solution: exercism-solutions/authentication-system Exercism #41: C# exercises on Exercism Learning Goal Constants, Defensive Copying, Readonly Collections Relevant Information Constant The const modifier can be (and generally should be) applied to any field where its value is known at compile time and will not change during the lifetime of the program. Use const when: Readonly The readonly modifier…
-

C# Track,Exercism #40 Remote control cleanup
Relevant link Github solution: exercism-solutions/remote-control-cleanup Exercism #40: C# exercises on Exercism Relevant information C# types can be defined within the scopes of a class or a struct. Access to the type is through the enclosing type with dot syntax. You can set access level for inner types. Private members of the outer type are in…