Skip to content

Commit

Permalink
Code clarification; slide change
Browse files Browse the repository at this point in the history
  • Loading branch information
srpeterson committed May 22, 2020
1 parent 97f79f5 commit 19e20c2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
12 changes: 6 additions & 6 deletions Code/CSharp.Examples/DataStuctures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace CSharp.Examples
{
public class Customer //good 'ol DTO or POCO
public class Person //good 'ol DTO or POCO
{
public string FirstName { get; set; }
public string LastName { get; set; }

}

public class ImmutableCustomer
public class ImmutablePerson
{
public ImmutableCustomer (string firstName, string lastName)
public ImmutablePerson (string firstName, string lastName)
{
FirstName = firstName;
LastName = lastName;
Expand All @@ -22,7 +22,7 @@ public ImmutableCustomer (string firstName, string lastName)

}

public class EquatableCustomer : IEquatable<EquatableCustomer>
public class EquatablePerson : IEquatable<EquatablePerson>
{
public string FirstName { get; set; }
public string LastName { get; set; }
Expand All @@ -31,10 +31,10 @@ public override bool Equals(object obj)
{
if (obj is null) return false;
if (ReferenceEquals(this, obj)) return true;
return obj.GetType() == GetType() && Equals(obj as EquatableCustomer);
return obj.GetType() == GetType() && Equals(obj as EquatablePerson);
}

public bool Equals(EquatableCustomer other)
public bool Equals(EquatablePerson other)
{
if (other == null) return false;

Expand Down
14 changes: 0 additions & 14 deletions Code/CSharp.Examples/Interactive.cs

This file was deleted.

1 change: 1 addition & 0 deletions Code/FSharp.Examples/Scripts/Interactive.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
open Fsharp.Examples.Interactive

let getLessThanTwo =
//getLessThanFour is actually run from Interactive.fs
getLessThanFour |> List.filter(fun i -> i < 2) //[0; 1]
Binary file modified Slides/Fsharp-Csharp-Developers.pptx
Binary file not shown.

0 comments on commit 19e20c2

Please sign in to comment.