Skip to content

Instantly share code, notes, and snippets.

@freestylecoder
freestylecoder / Program.cs
Last active May 20, 2016 14:01
Passing F# With to C#
using System;
using Types;
namespace App {
class Program {
static void Main( string[] args ) {
Tag testTag = new Tag( 1, "Original" );
Console.WriteLine( "{0}: {1}", testTag.Id, testTag.Text );
Tag newTag = testTag.With( nameof( testTag.Id ), 2 ).With( nameof( testTag.Text ), "New One" );
Console.WriteLine( "{0}: {1}", newTag.Id, newTag.Text );