Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created February 14, 2023 20:38
Show Gist options
  • Save jskeet/abfc4f99150acb66152c7914d0cb2444 to your computer and use it in GitHub Desktop.
Save jskeet/abfc4f99150acb66152c7914d0cb2444 to your computer and use it in GitHub Desktop.
using System;
using System.IO;
using System.Collections.Generic;
public interface IWriterService
{
Stream WriteTXT<T>(List<T> content, string delimiter,
string header, bool isHeader)
where T : class;
}
public class WriterService : IWriterService
{
public WriterService()
{
}
public Stream WriteTXT<T>(List<T> content, string delimiter,
string header, bool isHeader)
where T : class
{
var stream = new MemoryStream();
// Implementation removed as irrelevant
return stream;
}
}
class Test
{
static void Main()
{
List<string> list = new List<string>();
var service = new WriterService();
service.WriteTXT(list, "x", "y", false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment