Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Last active August 8, 2022 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/d74e87fa418b0ff2f946a92268c6070b to your computer and use it in GitHub Desktop.
Save lgolubyev/d74e87fa418b0ff2f946a92268c6070b to your computer and use it in GitHub Desktop.
using System;
using System.IO;
namespace CsharpSingleResponsibilityPrinciple
{
class Srp : IPrinciple
{
public string Principle()
{
return "Single Responsibility Principle in C#";
}
}
internal class User
{
public void Add(Database db)
{
try
{
db.Add();
}
catch (Exception ex)
{
File.WriteAllText(@"C:\something\Error.txt", ex.ToString());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment