Skip to content
MAKOLYTE

MAKOLYTE

Solve real coding problems

  • About
  • Latest
  • C#
    • ASP.NET
    • Event-driven
    • EF Core
    • Visual Studio
    • WinForms
    • Windows Service
  • Java
    • Setup
    • Spring
    • AWS
  • Python
  • SQL
    • SQL Server
    • MySQL
  • Principles and Practice
    • Algorithms
    • Design Patterns
    • Dependency Injection
    • Refactoring
    • Unit Testing

C#

C# Programming Language

Parsing CSV data when a field has commas

10/12/202012/01/2019 by Mak

Problem I am parsing CSV data and a string field contains commas. For example: The split string for the 3rd line will produce the array: The solution is to merge the slots that belong to the string field. In the example above, you would merge indexes 0 and 1. Code Tests

Categories C# Tags C#, Merging a string, Parsing CSV, Skipping a header Leave a comment

How to parse a comma-separated string from app.config

10/12/202011/24/2019 by Mak

I had to parse a list of comma-separated HTTP Response Codes from the app.config file and use them to retry HTTP POST requests if the response code was contained in that list. This article explains how to parse a list of comma-separated values from the app.config and put them into a HashSet so it can … Read more

Categories C# Tags app.config, C#, hashset, string parsing, unit tests Leave a comment
Post navigation
Newer posts
← Previous Page1 … Page31 Page32

Categories

  • C# (312)
    • ASP.NET (41)
    • Console App (10)
    • EF Core (15)
    • Event-driven (12)
    • Visual Studio (25)
    • Windows Service (3)
    • WinForms (22)
  • Git (2)
  • Java (7)
    • AWS (5)
    • Setup (1)
    • Spring (6)
  • JavaScript (3)
  • Notepad++ (1)
  • Postman (4)
  • PowerShell (2)
  • Principles and Practice (79)
    • Algorithms (16)
    • Data Structures (8)
    • Dependency Injection (15)
    • Design Patterns (11)
    • Refactoring (6)
    • Unit Testing (31)
  • Python (3)
  • SQL (50)
    • MySQL (5)
    • SQL Server (43)

Tags

ApiController appsettings.json ASP.NET AsyncAwait Attributes C# ConfigureServices Dapper DateTime Dependency Injection Dictionary EF Core Enum Exception Extension Methods foreach Generics GetAsync hashset HttpClient Install-Package JSON JsonConvert.DeserializeObject JsonConverter JsonSerializer JsonSerializer.Deserialize() JsonSerializerOptions Linq mocking Moq Newtonsoft.JSON Nuget Parameterized Unit Test Performance Performance Comparison Refactoring SELECT SQL Server StringBuilder System.Reflection System.Text.Json Threading unit testing Visual Studio WinForms

Privacy Policy

  • Privacy Policy
© 2022 MAKOLYTE • Built with GeneratePress