KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How would I do this (C#) in F# public class MyClass { void Render(TextWriter textWriter) { Tag(() => { textWriter.WriteLine("line 1"); textWriter.WriteLine("line 2"); }); Tag(value => { textWriter.WriteLine("line 1"); textWriter.WriteLine(value); }, "a"); } public void Tag(Action action) { action(); } public void Tag<T>(Action<T> action, T t) { action(t); } }
Tags (comma-separated)
Save Edits
Cancel