About and Contact AWS C# Docker Design Patterns Learning Patterns Principles
Carl Paton
About and Contact AWS C# Docker Design Patterns Learning Patterns Principles

❤️❤️❤️ Does my content help you? Consider a small donation if this blog helped you❤️❤️❤️

2019-Jul

Write To Text Files

StreamWriter

This will append to the file at filePath and use Newtonsoft.Json to serialize the data to JSON in someObject.

1
2
3
4
5
using (var sw = new StreamWriter(filePath, true, Encoding.ASCII)) 
{
sw.Write(JsonConvert.SerializeObject(someObject));
sw.Close();
}
Share
  • c#
Newer
Reading Text Files
Older
N-Tier Architecture

❤️❤️❤️ Does my content help you? Consider a small donation if this blog helped you❤️❤️❤️

Search

Recent Posts

  • Search engine optimization SEO
  • .Net MCP Server
  • MCP Transports
  • AWS IAM
  • PostgreSQL with Entity Framework Core

Tag Cloud

.net library 3d printing agile ai algorithms angular ansible anti pattern architecture arduino asp.net assembly auth aws azure beer behavioural patterns benchmarks board games browser utilities c# cad cam client side cloud events cnc continuous integration creational patterns cryptography css csv dapper data structures ddd dependency injection design dirt bike dns docker docker compose dynamics business central elk stack entra feature management filters food games git health checks hexo ide indymill infrastructure as code iot java javascript jquery json kibana kubernetes learning resources life-hacks linux llm logging mcp mocking model airplanes mvc mysql net core newrelic nginx node npm nuget onshape open source orm patterns principles postgresql power shell python random raspberry pi reactjs reactjs class-based redis reporting rosetta code seo serialization software testing sonarqube sql sqlite ssh static code analysis structural patterns sumologic swagger terraform threading typescript utilities validation virtualization web api web forms webpack wip wood work wordpress workers xamarin xml
© 2025 Carl Paton | Powered by Github Pages and Hexo