Created
          June 23, 2015 18:09 
        
      - 
      
- 
        Save hodzanassredin/a5e3d623e3110b91ced8 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // C# | |
| // public class Test { | |
| // public FSharpSet<int> SetNull { get; set; } | |
| // } | |
| let s : Set<int> = (new Test()).SetNull | |
| //or let s : Set<int> = Unchecked.defaultof<Set<int>> | |
| //The type 'Set<int>' does not have 'null' as a proper value | |
| //if s <> null then s |> Set.isEmpty |> ignore | |
| //nre | |
| s |> Set.isEmpty |> ignore | |
| //correct | |
| if Unchecked.defaultof<Set<int>> <> s then s |> Set.isEmpty |> ignore | |
| if obj.ReferenceEquals (s, null) |> not then s |> Set.isEmpty |> ignore | |
| printfn "%A" argv | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment